-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ffe000c
commit 1549651
Showing
10 changed files
with
182 additions
and
181 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
22 changes: 22 additions & 0 deletions
22
packages/apps/docs/src/components/Layout/Full/components/Aside/AsideList.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { asideListClass, asideListInnerVariants } from './styles.css'; | ||
|
||
import classNames from 'classnames'; | ||
import React, { FC, ReactNode } from 'react'; | ||
|
||
interface IProps { | ||
children: ReactNode; | ||
inner?: boolean; | ||
ref?: React.MutableRefObject<HTMLUListElement | null>; | ||
} | ||
|
||
export const AsideList: FC<IProps> = ({ children, inner = false, ref }) => { | ||
const classes = classNames( | ||
asideListClass, | ||
asideListInnerVariants[inner ? 'true' : 'false'], | ||
); | ||
return ( | ||
<ul ref={ref} className={classes}> | ||
{children} | ||
</ul> | ||
); | ||
}; |
125 changes: 0 additions & 125 deletions
125
packages/apps/docs/src/components/Layout/Full/components/Aside/AsideStyles.ts
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
packages/apps/docs/src/components/Layout/Full/components/Aside/index.ts
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,3 +1,3 @@ | ||
export * from './AsideLink'; | ||
export * from './AsideStyles'; | ||
export * from './AsideList'; | ||
export * from './ListItem'; |
61 changes: 61 additions & 0 deletions
61
packages/apps/docs/src/components/Layout/Full/components/Aside/styles.css.ts
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,61 @@ | ||
import { sprinkles, vars } from '@kadena/react-ui/theme'; | ||
|
||
import { style, styleVariants } from '@vanilla-extract/css'; | ||
|
||
export const asideItemLinkClass = style([ | ||
sprinkles({ | ||
textDecoration: 'none', | ||
}), | ||
{ | ||
selectors: { | ||
'&:hover': { | ||
textDecoration: 'underline', | ||
}, | ||
}, | ||
}, | ||
]); | ||
|
||
export const asideItemLinkActiveVariants = styleVariants({ | ||
true: { | ||
color: vars.colors.$neutral6, | ||
textDecoration: 'underline', | ||
}, | ||
false: { | ||
color: vars.colors.$primaryHighContrast, | ||
}, | ||
}); | ||
|
||
export const asideItemClass = style([ | ||
sprinkles({ | ||
lineHeight: '$base', | ||
}), | ||
{ | ||
selectors: { | ||
'&::marker': { | ||
color: vars.colors.$primaryHighContrast, | ||
fontWeight: vars.fontWeights.$bold, | ||
display: 'inline-block', | ||
width: vars.sizes.$4, | ||
margin: `0 ${vars.sizes.$1}`, | ||
}, | ||
}, | ||
}, | ||
]); | ||
|
||
export const asideListClass = style([ | ||
sprinkles({ | ||
margin: 0, | ||
padding: 0, | ||
}), | ||
{ | ||
listStyle: 'initial', | ||
listStylePosition: 'outside', | ||
}, | ||
]); | ||
|
||
export const asideListInnerVariants = styleVariants({ | ||
true: { | ||
paddingLeft: vars.sizes.$4, | ||
}, | ||
false: {}, | ||
}); |
Oops, something went wrong.