Skip to content

Commit

Permalink
doc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
talentlessguy committed Nov 30, 2024
1 parent f76c416 commit fc0e0d9
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 24 deletions.
8 changes: 8 additions & 0 deletions components/src/css/sprinkles.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ const staticProperties = defineProperties({
whiteSpace: ['normal', 'nowrap', 'pre', 'pre-line', 'pre-wrap', 'initial', 'inherit'],
textTransform: ['capitalize', 'uppercase', 'lowercase', 'none', 'initial', 'inherit'],
borderWidth: commonVars.borderWidths,
borderRightWidth: commonVars.borderWidths,
borderBottomWidth: commonVars.borderWidths,
borderLeftWidth: commonVars.borderWidths,
borderTopWidth: commonVars.borderWidths,
position: ['static', 'absolute', 'relative', 'fixed', 'sticky', 'initial', 'inherit'],
cursor: ['default', 'pointer', 'not-allowed', 'text', 'initial', 'inherit', 'unset'],
pointerEvents: ['none', 'auto', 'all', 'initial', 'inherit'],
Expand All @@ -140,6 +144,10 @@ const staticProperties = defineProperties({
boxSizing: ['border-box', 'content-box', 'inherit'],
wordBreak: ['break-all', 'normal', 'inherit'],
borderStyle: ['solid', 'none', 'inherit'],
borderRightStyle: ['solid', 'none', 'inherit'],
borderBottomStyle: ['solid', 'none', 'inherit'],
borderLeftStyle: ['solid', 'none', 'inherit'],
borderTopStyle: ['solid', 'none', 'inherit'],
touchAction: ['auto', 'none', 'inherit', 'unset'],
outline: ['none', 'initial', 'inherit'],
resize: ['none', 'initial', 'inherit'],
Expand Down
1 change: 1 addition & 0 deletions components/src/tokens/space.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const negativeSpace = {
'-4.5': '-1.125rem',
'-6': '-1.5rem',
'-px': '-1px',
'-full': '-100%',
}

export const space = {
Expand Down
15 changes: 10 additions & 5 deletions docs/src/components/NavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,17 @@ export const NavBar = ({
<Box
display="flex"
position="fixed"
// justifyContent="space-between"
justifyContent="space-between"
alignItems="center"
top="0"
left="0"
right="0"
padding={{ base: '4', sm: '6' }}
backgroundColor="backgroundPrimary"
height={{ base: '20', sm: '24' }}
// borderBottom="1px solid"
// borderBottomColor="border"
borderBottomWidth="1x"
borderBottomStyle="solid"
borderBottomColor="border"
>
<Box display="flex">
<Box
Expand All @@ -42,14 +43,18 @@ export const NavBar = ({
wh="full"
position="absolute"
opacity={open ? '1' : '0'}
// transition="opacity 0.2s ease-in-out"
transitionDuration={200}
transitionProperty="all"
transitionTimingFunction="ease-in-out"
/>
<Box
as={MenuSVG}
position="absolute"
wh="full"
opacity={open ? '0' : '1'}
transition="opacity 0.2s ease-in-out"
transitionProperty="all"
transitionDuration={200}
transitionTimingFunction="ease-in-out"
/>
</Box>
</Box>
Expand Down
36 changes: 18 additions & 18 deletions docs/src/components/SideBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,19 @@ const NavLink = ({
href,
children,
}: PropsWithChildren<{ active: boolean, href: string, target?: string }>) => (
<Box>
<Link href={href}>
<Box
backgroundColor={active ? 'blueSurface' : 'transparent'}
height="9"
display="flex"
alignItems="center"
borderRadius="large"
px="4"
>
<Typography color={active ? 'accent' : 'text'}>{children}</Typography>
</Box>
</Link>
</Box>
<Link href={href}>
<Box
backgroundColor={active ? 'blueSurface' : 'transparent'}
height="9"
display="flex"
alignItems="center"
borderRadius="large"
px="4"
>
<Typography color={active ? 'accent' : 'text'}>{children}</Typography>
</Box>
</Link>

)

const Heading = ({
Expand Down Expand Up @@ -70,14 +69,15 @@ export const SideBar = ({ open, links }: { open: boolean, links: Links }) => {
position="fixed"
flexDirection="column"
top={{ base: '20', sm: '24' }}
// left={{ base: open ? '0' : '-100%', sm: '0' }}
width="64"
bottom="0"
backgroundColor="backgroundPrimary"
borderRight="1px solid"
borderRightWidth="1x"
borderRightStyle="solid"
borderRightColor="border"
gap="4"
transition="left 0.2s ease-in-out"
left={{ sm: '0', base: open ? '0' : '-full' }}
style={{ transition: 'left 0.2s ease-in-out' }}
paddingRight="1"
>
<ScrollBox width="full" hideDividers>
Expand Down Expand Up @@ -155,7 +155,7 @@ export const SideBar = ({ open, links }: { open: boolean, links: Links }) => {
<div key={name}>
<Typography
key={name}
fontVariant="smallBold"
fontVariant="extraSmallBold"
color="textSecondary"
px="4"
textTransform="capitalize"
Expand Down
2 changes: 1 addition & 1 deletion docs/src/playroom/PlayroomState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const PlayroomStateProvider = ({
}: React.PropsWithChildren<Props>) => {
const [fallbackDefaultState] = React.useState(() => new Map())
const defaultState = defaultStateProp ?? fallbackDefaultState
const state = React.useState(new Map<string, any>())
const state = React.useState(() => new Map<string, any>())
const storeConsumer = React.useMemo(
() => makeStoreConsumer(defaultState, ...state),
[state, defaultState],
Expand Down

0 comments on commit fc0e0d9

Please sign in to comment.