Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

adding more stories

Jonathan Summers-Muir518d69d9619d
diff --git a/packages/ui/.storybook/main.js b/packages/ui/.storybook/main.js
index c8e3732e916..8762d261f24 100644
--- a/packages/ui/.storybook/main.js
+++ b/packages/ui/.storybook/main.js
@@ -11,6 +11,11 @@ module.exports = {
'../src/components/Accordion/Accordion.stories.tsx',
'../src/components/Alert/Alert.stories.tsx',
'../src/components/Avatar/Avatar.stories.tsx',
+ '../src/components/Button/Button.stories.tsx',
+ '../src/components/Checkbox/Checkbox.stories.tsx',
+ '../src/components/Collapsible/Collapsible.stories.tsx',
+ '../src/components/ContextMenu/ContextMenu.stories.tsx',
+ '../src/components/Dropdown/Dropdown.stories.tsx',
],
addons: [
'@storybook/addon-links',
diff --git a/packages/ui/index.tsx b/packages/ui/index.tsx
index 515a7c65357..8d7a3e17ac3 100644
--- a/packages/ui/index.tsx
+++ b/packages/ui/index.tsx
@@ -26,7 +26,6 @@ export * from './src/components/Alert'
export * from './src/components/Accordion'
export * from './src/components/Collapsible'
export * from './src/components/CodeBlock'
-// export * from './src/components/Breadcrumb'
// NAV
@@ -39,14 +38,12 @@ export * from './src/components/SidePanel'
export * from './src/components/Dropdown'
export * from './src/components/ContextMenu'
export * from './src/components/Popover'
-// export * from './src/components/Toast'
// UTILITIES
export * from './src/components/Space'
export * from './src/components/Loading'
export * from './src/components/Divider'
-// export * from './src/components/ThemeProvider'
// DATA ENTRY
@@ -63,20 +60,7 @@ export * from './src/components/Form'
// CMD+K
export * from './src/components/Command'
-// config
-
-// export { default as Config } from './../ui.config'
-
-// ARCHIVE
-
-// export * from './src/components/Textarea'
-
-// AUTH
-
-// export * from './src/components/Auth'
-
// ICONS
-
// export icons
export * from './src/components/Icon/icons/IconActivity'
export * from './src/components/Icon/icons/IconAirplay'
diff --git a/packages/ui/src/components/Button/Button.stories.tsx b/packages/ui/src/components/Button/Button.stories.tsx
index a65e2eefe74..e73cac1cc86 100644
--- a/packages/ui/src/components/Button/Button.stories.tsx
+++ b/packages/ui/src/components/Button/Button.stories.tsx
@@ -1,48 +1,25 @@
-// import React, { useRef, useState } from 'react'
-// import defaultTheme from '../../theme/defaultTheme'
-// import { ThemeProvider } from './../ThemeProvider'
-// import customThemeExample from '../../lib/theme/customThemeExample'
-
-import { useRef, useState } from 'react'
-import { Button, IconPackage, IconChevronRight } from './../../index'
+import { Button } from './'
+import { IconPackage } from './../Icon/icons/IconPackage'
+import { IconChevronRight } from './../Icon/icons/IconChevronRight'
export default {
title: 'General/Button',
component: Button,
}
-export const Default = (args: any) => <Button {...args}>Button text</Button>
+export const Neutral = (args: any) => <Button {...args}>Button text</Button>
+export const Success = (args: any) => <Button {...args}>Button text</Button>
+
export const withStyles = (args: any) => <Button {...args}>Button text</Button>
export const withIcon = (args: any) => <Button {...args}>Button text</Button>
-export const withIconRight = (args: any) => (
- <Button {...args}>Button text</Button>
-)
+export const withIconRight = (args: any) => <Button {...args}>Button text</Button>
export const withBlock = (args: any) => <Button {...args}>Button text</Button>
export const withOnlyIcon = (args: any) => <Button {...args} />
export const withOnlyLoading = (args: any) => <Button {...args} />
export const withLoadingCentered = (args: any) => (
<Button {...args}>Loading icon is centered</Button>
)
-export const withRef = () => {
- const buttonRef = useRef(null)
- const [msg, setMsg] = useState('Click button to console.log Ref')
-
- function onClick() {
- const message = `button:${buttonRef?.current} `
- setMsg(message)
- // console.log(message)
- }
- return (
- <>
- <Button ref={buttonRef} onClick={onClick}>
- Button with forwardRef
- </Button>
-
- <p style={{ color: '#666666' }}>{msg}</p>
- </>
- )
-}
export const allButtons = (args: any) => (
<>
<div className="flex flex-col space-y-4">
@@ -211,9 +188,7 @@ export const allButtons = (args: any) => (
</>
)
-export const withCustomTag = (args: any) => (
- <Button {...args}>Button text</Button>
-)
+export const withCustomTag = (args: any) => <Button {...args}>Button text</Button>
const icon = <IconPackage />
diff --git a/packages/ui/src/components/Checkbox/Checkbox.stories.tsx b/packages/ui/src/components/Checkbox/Checkbox.stories.tsx
index 75cb24c3ea0..55979991380 100644
--- a/packages/ui/src/components/Checkbox/Checkbox.stories.tsx
+++ b/packages/ui/src/components/Checkbox/Checkbox.stories.tsx
@@ -1,5 +1,3 @@
-import React from 'react'
-
import { Checkbox } from '.'
export default {
@@ -78,9 +76,7 @@ export const size = (args: any) => (
</Checkbox.Group>
)
-export const withBeforeAndAfterLabels = (args: any) => (
- <Checkbox.Group {...args} />
-)
+export const withBeforeAndAfterLabels = (args: any) => <Checkbox.Group {...args} />
Default.args = {
label: 'This is the label',
@@ -109,8 +105,7 @@ withGroupHorizontal.args = {
size.args = {
id: 'checkobox-q',
label: 'Control the size of the checkboxes',
- description:
- 'You can add a size just the Group component and it will affect the children',
+ description: 'You can add a size just the Group component and it will affect the children',
disabled: false,
className: 'font-sans',
layout: 'horizontal',
diff --git a/packages/ui/src/components/Collapsible/Collapsible.stories.tsx b/packages/ui/src/components/Collapsible/Collapsible.stories.tsx
index 6b723f7a438..8b6ca01742b 100644
--- a/packages/ui/src/components/Collapsible/Collapsible.stories.tsx
+++ b/packages/ui/src/components/Collapsible/Collapsible.stories.tsx
@@ -1,9 +1,6 @@
-import React from 'react'
-// import { AutoForm } from 'uniforms'
-
-import { Collapsible } from '.'
-import { IconChevronUp } from '../..'
-import { Button } from '../Button'
+import { Collapsible } from './'
+import { IconChevronUp } from '../../components/Icon/icons/IconChevronUp'
+import { Button } from './../Button'
export default {
title: 'Displays/Collapsible',
@@ -13,14 +10,12 @@ export default {
export const Default = (args: any) => {
return (
<>
- hello all
<Collapsible className="-space-y-px">
<Collapsible.Trigger asChild>
<button
type="button"
className="group text-scale-1200 flex justify-between items-center w-full bg-scale-300 rounded border border-scale-500 p-3"
>
- Hello
<div className="flex gap-2 items-center">
<IconChevronUp className="transition data-open-parent:rotate-0 data-closed-parent:rotate-180" />
<Button
@@ -28,7 +23,7 @@ export const Default = (args: any) => {
e.stopPropagation()
}}
>
- Turn it on
+ Example button
</Button>
</div>
</button>
@@ -44,7 +39,7 @@ export const Default = (args: any) => {
</Collapsible>
<Collapsible>
<Collapsible.Trigger asChild>
- <button type="button">Hello</button>
+ <button type="button">Click me to expand</button>
</Collapsible.Trigger>
<Collapsible.Content>
<div>
diff --git a/packages/ui/src/components/Collapsible/Collapsible.tsx b/packages/ui/src/components/Collapsible/Collapsible.tsx
index e137af1003f..9b66de65179 100644
--- a/packages/ui/src/components/Collapsible/Collapsible.tsx
+++ b/packages/ui/src/components/Collapsible/Collapsible.tsx
@@ -4,7 +4,6 @@ import styleHandler from '../../lib/theme/styleHandler'
export interface CollapsibleProps extends RadixCollapsible.CollapsibleProps {
children: React.ReactNode
- // onChange?: (e: boolean) => void
}
export const Collapsible = ({
@@ -13,12 +12,6 @@ export const Collapsible = ({
className,
...props
}: CollapsibleProps) => {
- // const [_open, setOpen] = React.useState(open)
-
- // function handleOpenChange(e: boolean) {
- // console.log(e)
- // if (onChange) onChange(e)
- // }
return (
<RadixCollapsible.Root
defaultOpen={props.defaultOpen}
diff --git a/packages/ui/src/components/ContextMenu/ContextMenu.stories.tsx b/packages/ui/src/components/ContextMenu/ContextMenu.stories.tsx
index d2d155e8c47..10b4f3ef8eb 100644
--- a/packages/ui/src/components/ContextMenu/ContextMenu.stories.tsx
+++ b/packages/ui/src/components/ContextMenu/ContextMenu.stories.tsx
@@ -1,8 +1,8 @@
import React, { useState } from 'react'
import { Button } from '../Button'
import { Divider } from '../Divider'
-import { IconSettings, IconLogOut } from '../../index'
-import Typography from '../Typography'
+import { IconSettings } from '../Icon/icons/IconSettings'
+import { IconLogOut } from '../Icon/icons/IconLogOut'
import { ContextMenu } from '.'
import { IconLogIn } from '../Icon/icons/IconLogIn'
@@ -34,25 +34,16 @@ export const Default = (args: any) => (
overlay={[
<ContextMenu.Misc>
<div>
- <Typography.Text small className="block">
- Signed in as{' '}
- </Typography.Text>
-
- <Typography.Text small strong>
- </Typography.Text>
+ <span className="block">Signed in as </span>
+ <span>[email protected] </span>
</div>
</ContextMenu.Misc>,
<Divider light />,
<ContextMenu.Label>Group label</ContextMenu.Label>,
- <ContextMenu.Item onClick={() => console.log('clicked')}>
- Account
- </ContextMenu.Item>,
+ <ContextMenu.Item onClick={() => console.log('clicked')}>Account</ContextMenu.Item>,
<ContextMenu.Item>Settings</ContextMenu.Item>,
<Divider light />,
- <ContextMenu.Item icon={<IconLogIn size="tiny" />}>
- Log out
- </ContextMenu.Item>,
+ <ContextMenu.Item icon={<IconLogIn size="tiny" />}>Log out</ContextMenu.Item>,
]}
>
{triggerArea}
@@ -68,8 +59,8 @@ export const doNotcloseOverlay = (args: any) => (
{...args}
overlay={[
<ContextMenu.Misc>
- <Typography.Text>Signed in as </Typography.Text>
- <Typography.Text strong>[email protected] </Typography.Text>
+ <span>Signed in as </span>
+ <span>[email protected] </span>
</ContextMenu.Misc>,
<Divider light />,
<ContextMenu.Item>Account</ContextMenu.Item>,
@@ -101,8 +92,8 @@ export const withCustomStyles = (args: any) => (
{...args}
overlay={[
<ContextMenu.Item>
- <Typography.Text>Signed in as </Typography.Text>
- <Typography.Text strong>[email protected] </Typography.Text>
+ <span>Signed in as </span>
+ <span>[email protected] </span>
</ContextMenu.Item>,
<Divider light />,
<ContextMenu.Item>Account</ContextMenu.Item>,
@@ -130,9 +121,7 @@ export const Checkbox = (args: any) => {
<ContextMenu
{...args}
overlay={[
- <ContextMenu.Item icon={<IconSettings size="small" />}>
- Account
- </ContextMenu.Item>,
+ <ContextMenu.Item icon={<IconSettings size="small" />}>Account</ContextMenu.Item>,
<ContextMenu.Item>Settings</ContextMenu.Item>,
<Divider light />,
<ContextMenu.Checkbox checked={checked} onChange={setChecked}>
diff --git a/packages/ui/src/components/ContextMenu/ContextMenu.tsx b/packages/ui/src/components/ContextMenu/ContextMenu.tsx
index 5a364ca4d5e..20ae5f6f66b 100644
--- a/packages/ui/src/components/ContextMenu/ContextMenu.tsx
+++ b/packages/ui/src/components/ContextMenu/ContextMenu.tsx
@@ -1,11 +1,7 @@
import React, { useState } from 'react'
-// import * as RadixContextMenu from '@radix-ui/react-dropdown-menu'
import { IconCheck } from '../Icon/icons/IconCheck'
-// @ts-ignore
-// import ContextMenuStyles from './ContextMenu.module.css'
-
import type * as RadixContextMenuTypes from '@radix-ui/react-context-menu/'
import * as RadixContextMenu from '@radix-ui/react-context-menu'
diff --git a/packages/ui/src/components/Divider/Divider.stories.tsx b/packages/ui/src/components/Divider/Divider.stories.tsx
index 8826bebe1e3..eb0c6246ffd 100644
--- a/packages/ui/src/components/Divider/Divider.stories.tsx
+++ b/packages/ui/src/components/Divider/Divider.stories.tsx
@@ -1,6 +1,4 @@
-import React from 'react'
import { Button } from '../Button'
-import Typography from '../Typography'
import { Divider } from './'
export default {
@@ -10,17 +8,11 @@ export default {
export const Default = (args: any) => <Divider {...args} />
-export const withCenterText = (args: any) => (
- <Divider {...args}>Hello world</Divider>
-)
+export const withCenterText = (args: any) => <Divider {...args}>Hello world</Divider>
-export const withLeftText = (args: any) => (
- <Divider {...args}>Hello world</Divider>
-)
+export const withLeftText = (args: any) => <Divider {...args}>Hello world</Divider>
-export const withRightText = (args: any) => (
- <Divider {...args}>Hello world</Divider>
-)
+export const withRightText = (args: any) => <Divider {...args}>Hello world</Divider>
export const lighterColor = (args: any) => <Divider {...args} />
@@ -32,7 +24,7 @@ export const vertical = (args: any) => (
<Divider {...args} />
<Button>Button two</Button>
<Divider {...args} />
- <Typography.Text>Some text</Typography.Text>
+ <span>Some text</span>
<Divider {...args} />
<Button>Button three</Button>
</div>
diff --git a/packages/ui/src/components/Dropdown/Dropdown.stories.tsx b/packages/ui/src/components/Dropdown/Dropdown.stories.tsx
index 36a13dfd86c..aad3a3d7964 100644
--- a/packages/ui/src/components/Dropdown/Dropdown.stories.tsx
+++ b/packages/ui/src/components/Dropdown/Dropdown.stories.tsx
@@ -1,19 +1,15 @@
import React, { useState } from 'react'
-import { Button } from '../Button'
-import { Divider } from '../Divider'
-import {
- IconSettings,
- IconLogOut,
- IconChevronDown,
- IconChevronRight,
- IconHardDrive,
-} from './../../index'
-import Typography from '../Typography'
-
import { Dropdown } from './'
-import { IconLogIn } from '../Icon/icons/IconLogIn'
+import { Button } from '../Button'
import { Input } from '../Input'
-import { IconSearch } from '../Icon/icons/IconSearch'
+
+import { IconSettings } from './../Icon/icons/IconSettings'
+import { IconLogOut } from './../Icon/icons/IconLogOut'
+import { IconChevronDown } from './../Icon/icons/IconChevronDown'
+import { IconChevronRight } from './../Icon/icons/IconChevronRight'
+import { IconHardDrive } from './../Icon/icons/IconHardDrive'
+import { IconLogIn } from './../Icon/icons/IconLogIn'
+import { IconSearch } from './../Icon/icons/IconSearch'
export default {
title: 'Navigation/Dropdown',
@@ -37,9 +33,7 @@ const DemoContainer = ({ children }: { children: React.ReactNode }) => (
"
>
<div>
- <h4 className="text-scale-1200 text-base">
- Shall we nest some components?
- </h4>
+ <h4 className="text-scale-1200 text-base">Shall we nest some components?</h4>
<p className="text-scale-1100 text-sm">yea sure, go on then.</p>
</div>
<div className="relative">{children}</div>
@@ -59,20 +53,14 @@ export const DefaultFull = (args: any) => {
overlay={[
<Dropdown.Misc>
<div>
- <Typography.Text small className="block">
- Signed in as{' '}
- </Typography.Text>
+ <span className="block">Signed in as </span>
- <Typography.Text small strong>
- </Typography.Text>
+ <span>[email protected] </span>
</div>
</Dropdown.Misc>,
<Dropdown.Separator />,
<Dropdown.Label>Group label</Dropdown.Label>,
- <Dropdown.Item onClick={() => console.log('clicked')}>
- Account
- </Dropdown.Item>,
+ <Dropdown.Item onClick={() => console.log('clicked')}>Account</Dropdown.Item>,
<Dropdown.Item>
Settings <Dropdown.RightSlot>⌘+T</Dropdown.RightSlot>
</Dropdown.Item>,
@@ -97,9 +85,7 @@ export const DefaultFull = (args: any) => {
</Dropdown.RadioGroup>,
<Dropdown.Separator />,
<Dropdown.Label>Group label</Dropdown.Label>,
- <Dropdown.Item onClick={() => console.log('clicked')}>
- Account
- </Dropdown.Item>,
+ <Dropdown.Item onClick={() => console.log('clicked')}>Account</Dropdown.Item>,
<Dropdown.Item>
Settings <Dropdown.RightSlot>⌘+T</Dropdown.RightSlot>
</Dropdown.Item>,
@@ -113,9 +99,7 @@ export const DefaultFull = (args: any) => {
</Dropdown.TriggerItem>
</Dropdown>,
<Dropdown.Separator />,
- <Dropdown.Item icon={<IconLogIn size="tiny" />}>
- Log out
- </Dropdown.Item>,
+ <Dropdown.Item icon={<IconLogIn size="tiny" />}>Log out</Dropdown.Item>,
]}
>
<Button as="span" type="default" iconRight={<IconChevronDown />}>
@@ -133,20 +117,14 @@ export const Default = (args: any) => (
overlay={[
<Dropdown.Misc>
<div>
- <Typography.Text small className="block">
- Signed in as{' '}
- </Typography.Text>
+ <span className="block">Signed in as </span>
- <Typography.Text small strong>
- </Typography.Text>
+ <span>[email protected] </span>
</div>
</Dropdown.Misc>,
<Dropdown.Separator />,
<Dropdown.Label>Group label</Dropdown.Label>,
- <Dropdown.Item onClick={() => console.log('clicked')}>
- Account
- </Dropdown.Item>,
+ <Dropdown.Item onClick={() => console.log('clicked')}>Account</Dropdown.Item>,
<Dropdown.Item>
Settings <Dropdown.RightSlot>⌘+T</Dropdown.RightSlot>
</Dropdown.Item>,
@@ -169,8 +147,8 @@ export const doNotcloseOverlay = (args: any) => (
{...args}
overlay={[
<Dropdown.Misc>
- <Typography.Text>Signed in as </Typography.Text>
- <Typography.Text strong>[email protected] </Typography.Text>
+ <span>Signed in as </span>
+ <span>[email protected] </span>
</Dropdown.Misc>,
<Dropdown.Separator />,
<Dropdown.Item>Account</Dropdown.Item>,
@@ -204,8 +182,8 @@ export const withCustomStyles = (args: any) => (
{...args}
overlay={[
<Dropdown.Item>
- <Typography.Text>Signed in as </Typography.Text>
- <Typography.Text strong>[email protected] </Typography.Text>
+ <span>Signed in as </span>
+ <span>[email protected] </span>
</Dropdown.Item>,
<Dropdown.Separator />,
<Dropdown.Item>Account</Dropdown.Item>,
@@ -232,20 +210,20 @@ export const SearchList = (args: any) => (
<Dropdown
{...args}
overlay={[
+ <Dropdown.Misc>
+ <Input size="tiny" icon={<IconSearch size={14} />} autoFocus={false} />
+ </Dropdown.Misc>,
<Dropdown.Item>
- <Input size="tiny" icon={<IconSearch />} autofocus={false} />
- </Dropdown.Item>,
- <Dropdown.Item>
- <Typography.Text>Signed in as </Typography.Text>
- <Typography.Text strong>[email protected] </Typography.Text>
+ <span>Signed in as </span>
+ <span>[email protected] </span>
</Dropdown.Item>,
<Dropdown.Item>
- <Typography.Text>Signed in as </Typography.Text>
- <Typography.Text strong>[email protected] </Typography.Text>
+ <span>Signed in as </span>
+ <span>[email protected] </span>
</Dropdown.Item>,
<Dropdown.Separator />,
<Dropdown.Item icon={<IconLogIn />}>
- <Typography.Text>Log out</Typography.Text>
+ <span>Log out</span>
</Dropdown.Item>,
]}
>
@@ -258,90 +236,88 @@ export const SearchList = (args: any) => (
SearchList.args = {}
-export const Checkbox = (args: any) => {
- const [checked, setChecked] = useState(false)
+// export const Checkbox = (args: any) => {
+// const [checked, setChecked] = useState(false)
- return (
- <div style={{ margin: '0 auto', minHeight: '420px', marginTop: '220px' }}>
- <Dropdown
- {...args}
- overlay={[
- <Dropdown.Item icon={<IconSettings size="small" />}>
- Account
- </Dropdown.Item>,
- <Dropdown.Item>Settings</Dropdown.Item>,
- <Dropdown.Separator />,
- <Dropdown.Checkbox checked={checked} onChange={setChecked}>
- Show subtitles
- </Dropdown.Checkbox>,
- ]}
- >
- <Button as="span" type="outline" iconRight={<IconChevronDown />}>
- Click for dropdown
- </Button>
- </Dropdown>
- </div>
- )
-}
+// return (
+// <div style={{ margin: '0 auto', minHeight: '420px', marginTop: '220px' }}>
+// <Dropdown
+// {...args}
+// overlay={[
+// <Dropdown.Item icon={<IconSettings size="small" />}>Account</Dropdown.Item>,
+// <Dropdown.Item>Settings</Dropdown.Item>,
+// <Dropdown.Separator />,
+// <Dropdown.Checkbox checked={checked} onChange={setChecked}>
+// Show subtitles
+// </Dropdown.Checkbox>,
+// ]}
+// >
+// <Button as="span" type="outline" iconRight={<IconChevronDown />}>
+// Click for dropdown
+// </Button>
+// </Dropdown>
+// </div>
+// )
+// }
-export const Radio = (args: any) => {
- const [value, setValue] = useState('red')
+// export const Radio = (args: any) => {
+// const [value, setValue] = useState('red')
- return (
- <div style={{ margin: '0 auto', minHeight: '420px', marginTop: '220px' }}>
- <Dropdown
- {...args}
- overlay={[
- <Dropdown.RadioGroup value={value} onChange={setValue}>
- <Dropdown.Radio value={'red'}>Red</Dropdown.Radio>
- <Dropdown.Radio value={'blue'}>Blue</Dropdown.Radio>
- <Dropdown.Radio value={'green'}>Green</Dropdown.Radio>
- </Dropdown.RadioGroup>,
- ]}
- >
- <Button as="span" type="outline" iconRight={<IconChevronDown />}>
- Click for dropdown
- </Button>
- </Dropdown>
- </div>
- )
-}
+// return (
+// <div style={{ margin: '0 auto', minHeight: '420px', marginTop: '220px' }}>
+// <Dropdown
+// {...args}
+// overlay={[
+// <Dropdown.RadioGroup value={value} onChange={setValue}>
+// <Dropdown.Radio value={'red'}>Red</Dropdown.Radio>
+// <Dropdown.Radio value={'blue'}>Blue</Dropdown.Radio>
+// <Dropdown.Radio value={'green'}>Green</Dropdown.Radio>
+// </Dropdown.RadioGroup>,
+// ]}
+// >
+// <Button as="span" type="outline" iconRight={<IconChevronDown />}>
+// Click for dropdown
+// </Button>
+// </Dropdown>
+// </div>
+// )
+// }
-export const Nested = (args: any) => {
- const [value, setValue] = useState('red')
+// export const Nested = (args: any) => {
+// const [value, setValue] = useState('red')
- return (
- <div style={{ margin: '0 auto', minHeight: '420px', marginTop: '220px' }}>
- <Dropdown
- {...args}
- overlay={
- <>
- <Dropdown.RadioGroup value={value} onChange={setValue}>
- <Dropdown.Radio value={'red'}>Red</Dropdown.Radio>
- <Dropdown.Radio value={'blue'}>Blue</Dropdown.Radio>
- <Dropdown.Radio value={'green'}>Green</Dropdown.Radio>
- </Dropdown.RadioGroup>
+// return (
+// <div style={{ margin: '0 auto', minHeight: '420px', marginTop: '220px' }}>
+// <Dropdown
+// {...args}
+// overlay={
+// <>
+// <Dropdown.RadioGroup value={value} onChange={setValue}>
+// <Dropdown.Radio value={'red'}>Red</Dropdown.Radio>
+// <Dropdown.Radio value={'blue'}>Blue</Dropdown.Radio>
+// <Dropdown.Radio value={'green'}>Green</Dropdown.Radio>
+// </Dropdown.RadioGroup>
- <Dropdown
- isNested
- overlay={[
- <Dropdown.RadioGroup value={value} onChange={setValue}>
- <Dropdown.Radio value={'red'}>Red</Dropdown.Radio>
- <Dropdown.Radio value={'blue'}>Blue</Dropdown.Radio>
- <Dropdown.Radio value={'green'}>Green</Dropdown.Radio>
- </Dropdown.RadioGroup>,
- ]}
- >
- <Dropdown.TriggerItem>Open sub menu</Dropdown.TriggerItem>
- </Dropdown>
- <Dropdown.Item>hello</Dropdown.Item>
- </>
- }
- >
- <Button as="span" type="outline" iconRight={<IconChevronDown />}>
- Click for dropdown
- </Button>
- </Dropdown>
- </div>
- )
-}
+// <Dropdown
+// isNested
+// overlay={[
+// <Dropdown.RadioGroup value={value} onChange={setValue}>
+// <Dropdown.Radio value={'red'}>Red</Dropdown.Radio>
+// <Dropdown.Radio value={'blue'}>Blue</Dropdown.Radio>
+// <Dropdown.Radio value={'green'}>Green</Dropdown.Radio>
+// </Dropdown.RadioGroup>,
+// ]}
+// >
+// <Dropdown.TriggerItem>Open sub menu</Dropdown.TriggerItem>
+// </Dropdown>
+// <Dropdown.Item>hello</Dropdown.Item>
+// </>
+// }
+// >
+// <Button as="span" type="outline" iconRight={<IconChevronDown />}>
+// Click for dropdown
+// </Button>
+// </Dropdown>
+// </div>
+// )
+// }
diff --git a/packages/ui/src/components/Input/Input.tsx b/packages/ui/src/components/Input/Input.tsx
index a78fade9330..1126b10a73c 100644
--- a/packages/ui/src/components/Input/Input.tsx
+++ b/packages/ui/src/components/Input/Input.tsx
@@ -1,8 +1,12 @@
import React, { useEffect, useState } from 'react'
-import { Button, IconCopy } from '../../../index'
+import { IconCopy } from '../Icon/icons/IconCopy'
+import { Button } from '../Button'
+
import { FormLayout } from '../../lib/Layout/FormLayout'
+
import InputErrorIcon from '../../lib/Layout/InputErrorIcon'
import InputIconContainer from '../../lib/Layout/InputIconContainer'
+
import { HIDDEN_PLACEHOLDER } from './../../lib/constants'
import styleHandler from '../../lib/theme/styleHandler'
diff --git a/packages/ui/src/lib/Layout/InputErrorIcon.tsx b/packages/ui/src/lib/Layout/InputErrorIcon.tsx
index 7cd72f2577f..7bbdd4713cd 100644
--- a/packages/ui/src/lib/Layout/InputErrorIcon.tsx
+++ b/packages/ui/src/lib/Layout/InputErrorIcon.tsx
@@ -1,7 +1,7 @@
import React from 'react'
import styleHandler from '../theme/styleHandler'
// @ts-ignore
-import { IconAlertCircle } from './../../../index'
+import { IconAlertCircle } from './../../components/Icon/icons/IconAlertCircle'
interface Props {
style?: React.CSSProperties
@@ -13,12 +13,7 @@ export default function InputErrorIcon({ style, size }: Props) {
return (
<div className={__styles.base} style={style}>
- <IconAlertCircle
- size={size}
- strokeWidth={2}
- // stroke={'#f56565'}
- className=""
- />
+ <IconAlertCircle size={size} strokeWidth={2} className="" />
</div>
)
}