diff --git a/src/components/atoms/Input/InputElement.module.css b/src/components/atoms/Input/InputElement.module.css index fc21df932..5f8d86860 100644 --- a/src/components/atoms/Input/InputElement.module.css +++ b/src/components/atoms/Input/InputElement.module.css @@ -135,9 +135,8 @@ /* Size modifiers */ .small { - composes: input; font-size: var(--font-size-small); - min-height: 32px; + min-height: 34px; padding: calc(var(--spacer) / 4); } @@ -146,8 +145,8 @@ } .selectSmall { - composes: select; - height: 32px; + composes: small; + height: 34px; padding-right: 2rem; /* custom arrow */ diff --git a/src/components/atoms/Input/InputElement.tsx b/src/components/atoms/Input/InputElement.tsx index b411ae6e4..4f1485238 100644 --- a/src/components/atoms/Input/InputElement.tsx +++ b/src/components/atoms/Input/InputElement.tsx @@ -11,12 +11,16 @@ const DefaultInput = (props: InputProps) => ( ) export default function InputElement(props: InputProps): ReactElement { - const { type, options, name, prefix, postfix } = props + const { type, options, name, prefix, postfix, small } = props switch (type) { case 'select': return ( - {options && options diff --git a/src/components/atoms/Input/index.tsx b/src/components/atoms/Input/index.tsx index bdedc1670..2c797b5d1 100644 --- a/src/components/atoms/Input/index.tsx +++ b/src/components/atoms/Input/index.tsx @@ -37,6 +37,8 @@ export interface InputProps { prefix?: string postfix?: string step?: string + defaultChecked?: boolean + small?: boolean } export default function Input(props: Partial): ReactElement { diff --git a/src/components/molecules/Menu.tsx b/src/components/molecules/Menu.tsx index ddfcbb620..aa7ffacbe 100644 --- a/src/components/molecules/Menu.tsx +++ b/src/components/molecules/Menu.tsx @@ -6,6 +6,7 @@ import styles from './Menu.module.css' import { useSiteMetadata } from '../../hooks/useSiteMetadata' import { ReactComponent as Logo } from '@oceanprotocol/art/logo/logo.svg' import Container from '../atoms/Container' +import UserPreferences from './UserPreferences' const Wallet = loadable(() => import('./Wallet')) @@ -49,6 +50,9 @@ export default function Menu(): ReactElement { ))} +
  • + +
  • diff --git a/src/components/molecules/UserPreferences/Preferences.tsx b/src/components/molecules/UserPreferences/Preferences.tsx new file mode 100644 index 000000000..a1f730d71 --- /dev/null +++ b/src/components/molecules/UserPreferences/Preferences.tsx @@ -0,0 +1,38 @@ +import React, { ReactElement, ChangeEvent } from 'react' +import { useUserPreferences } from '../../../providers/UserPreferences' +import Input from '../../atoms/Input' +import styles from './Preferencs.module.css' + +export default function Preferences(): ReactElement { + const { debug, setDebug, currency, setCurrency } = useUserPreferences() + + return ( + + ) +} diff --git a/src/components/molecules/UserPreferences/Preferencs.module.css b/src/components/molecules/UserPreferences/Preferencs.module.css new file mode 100644 index 000000000..f3a422228 --- /dev/null +++ b/src/components/molecules/UserPreferences/Preferencs.module.css @@ -0,0 +1,3 @@ +.preferences { + padding: calc(var(--spacer) / 2); +} diff --git a/src/components/molecules/UserPreferences/index.tsx b/src/components/molecules/UserPreferences/index.tsx new file mode 100644 index 000000000..b87ff94de --- /dev/null +++ b/src/components/molecules/UserPreferences/index.tsx @@ -0,0 +1,11 @@ +import React, { ReactElement } from 'react' +import Tooltip from '../../atoms/Tooltip' +import Preferences from './Preferences' + +export default function UserPreferences(): ReactElement { + return ( + } trigger="click focus"> + Settings + + ) +}