- Notifications
You must be signed in to change notification settings - Fork929
feat: implement CRUD UI for IDP organization sync settings#15503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes from1 commit
d0baa8c
6463076
f714986
072d775
f6e286c
acf8cbe
ad1aa84
b01588d
6203d04
bc37998
2c2246d
6971f91
6e87130
a1b6e79
36c8706
a4e66c2
f7be49f
90a65fe
c282765
40155bc
a129820
8edd4b4
e54e5ca
bb16bd1
678a91d
a13d9b2
1b8efd1
137c25c
46a4646
85a455c
a9e06f1
d921b08
ba665b4
8a0e789
234c0fb
7d88a38
c6c9b16
5322a4e
eab8a0d
721d5d4
8986cbd
89a7b12
148dca7
0c338b0
0cadc8b
1d7153b
a914c54
bd307c0
95bfd17
82bd850
6eb6987
3822b2e
fe17b1c
e75e179
c6e07ff
a3b9b27
0601164
b01e5d3
1c5b6ef
6e2ee08
ae30db0
ac74cdc
a99dca5
4c00959
568a5a9
c313439
506223d
f223ab7
94ff4ca
9101e0e
5ca2c0c
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import type { Meta, StoryObj } from "@storybook/react"; | ||
import { Switch } from "./Switch"; | ||
const meta: Meta<typeof Switch> = { | ||
title: "components/Switch", | ||
component: Switch, | ||
}; | ||
export default meta; | ||
type Story = StoryObj<typeof Switch>; | ||
export const DefaultOn: Story = { | ||
args: { | ||
checked: true, | ||
disabled: false, | ||
}, | ||
}; | ||
export const DefaultOff: Story = { | ||
args: { | ||
checked: false, | ||
disabled: false, | ||
} | ||
}; | ||
export const DisabledOn: Story = { | ||
args: { | ||
checked: true, | ||
disabled: true, | ||
}, | ||
}; | ||
export const DisabledOff: Story = { | ||
args: { | ||
checked: false, | ||
disabled: true, | ||
}, | ||
}; | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/** | ||
* Copied from shadc/ui on 11/13/2024 | ||
* @see {@link https://ui.shadcn.com/docs/components/switch} | ||
*/ | ||
import * as SwitchPrimitives from "@radix-ui/react-switch"; | ||
import * as React from "react"; | ||
jaaydenh marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
jaaydenh marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
import { cn } from "utils/cn"; | ||
export const Switch = React.forwardRef< | ||
React.ElementRef<typeof SwitchPrimitives.Root>, | ||
React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root> | ||
>(({ className, ...props }, ref) => ( | ||
<SwitchPrimitives.Root | ||
className={cn( | ||
`peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full shadow-sm transition-colors | ||
border-2 border-transparent | ||
focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-content-link | ||
focus-visible:ring-offset-2 focus-visible:ring-offset-surface-primary | ||
disabled:cursor-not-allowed | ||
data-[state=checked]:disabled:bg-surface-tertiary data-[state=unchecked]:disabled:bg-surface-tertiary | ||
data-[state=checked]:hover:bg-surface-invert-secondary data-[state=unchecked]:hover:bg-surface-tertiary | ||
data-[state=checked]:bg-surface-invert-primary data-[state=unchecked]:bg-surface-quaternary`, | ||
className, | ||
)} | ||
{...props} | ||
ref={ref} | ||
> | ||
<SwitchPrimitives.Thumb | ||
className={cn( | ||
`pointer-events-none block h-4 w-4 rounded-full bg-surface-primary shadow-lg ring-0 transition-transform | ||
data-[state=checked]:translate-x-2.5 data-[state=unchecked]:-translate-x-1.5`, | ||
)} | ||
/> | ||
</SwitchPrimitives.Root> | ||
)); |
This file was deleted.
Uh oh!
There was an error while loading.Please reload this page.
jaaydenh marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. |