-
Notifications
You must be signed in to change notification settings - Fork 351
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(devtools): storage presets manager (#5568)
- Loading branch information
Showing
88 changed files
with
2,783 additions
and
867 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
packages/devtools/client/src/components/Card/Card.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
.card { | ||
border: solid 1px var(--gray-4); | ||
background-color: var(--gray-1); | ||
border-radius: var(--radius-4); | ||
padding: var(--space-3); | ||
&[data-variant='indicate'] { | ||
border-radius: var(--radius-5); | ||
box-shadow: var(--shadow-4); | ||
padding: var(--space-5); | ||
} | ||
&[data-variant='small'] { | ||
} | ||
&[data-inset='true'] { | ||
padding: 0; | ||
} | ||
&[data-clickable='true'] { | ||
cursor: pointer; | ||
& * { | ||
cursor: pointer; | ||
} | ||
&:active { | ||
background-color: var(--gray-4); | ||
} | ||
} | ||
&[data-selected='true'] { | ||
border-color: var(--gray-8); | ||
outline: solid 1px var(--gray-8); | ||
} | ||
transition: background-color 100ms; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import { FC } from 'react'; | ||
import clsx from 'clsx'; | ||
import { Box, Flex } from '@radix-ui/themes'; | ||
import type { BoxProps } from '@radix-ui/themes/dist/cjs/components/box'; | ||
import type { FlexProps } from '@radix-ui/themes/dist/cjs/components/flex'; | ||
import styles from './Card.module.scss'; | ||
|
||
export interface CardProps | ||
extends Omit<BoxProps, 'inset'>, | ||
React.RefAttributes<HTMLDivElement> { | ||
variant?: 'indicate' | 'small'; | ||
clickable?: boolean; | ||
selected?: boolean; | ||
inset?: boolean; | ||
} | ||
|
||
export const Card: FC<CardProps> = props => { | ||
const { | ||
children, | ||
className, | ||
variant, | ||
clickable = false, | ||
selected = false, | ||
inset = false, | ||
...rest | ||
} = props; | ||
return ( | ||
<Box | ||
{...rest} | ||
data-variant={variant ?? ''} | ||
data-clickable={clickable} | ||
data-selected={selected} | ||
data-inset={inset} | ||
className={clsx(styles.card, className)} | ||
> | ||
{children} | ||
</Box> | ||
); | ||
}; | ||
|
||
export const CardColumn: FC<FlexProps> = props => ( | ||
<Flex | ||
gap="2" | ||
height="100%" | ||
justify="center" | ||
direction="column" | ||
align="start" | ||
{...props} | ||
/> | ||
); |
8 changes: 0 additions & 8 deletions
8
packages/devtools/client/src/components/Card/Indicate.module.scss
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export * from './Indicate'; | ||
export * from './Card'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 3 additions & 6 deletions
9
packages/devtools/client/src/components/Devtools/FrameBox.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 3 additions & 4 deletions
7
packages/devtools/client/src/components/PairsEditor/Editor.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.