-
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
0809702
commit 9fb19b5
Showing
10 changed files
with
362 additions
and
19 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
28 changes: 28 additions & 0 deletions
28
packages/libs/kode-ui/src/components/SideBar/components/Logo/KLogo.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,28 @@ | ||
import type { FC } from 'react'; | ||
import React from 'react'; | ||
|
||
export const KLogo: FC<{ height: number; className?: string }> = (props) => ( | ||
<svg | ||
data-style="kdacolor" | ||
viewBox="0 0 64 64" | ||
fill="none" | ||
xmlns="http://www.w3.org/2000/svg" | ||
{...props} | ||
> | ||
<path | ||
d="M56.8703 56L39.4779 55.9911L17.7995 39.0708L26.6166 32L56.8703 56Z" | ||
id="{kda.foundation.color.icon.brand.logo.default}" | ||
fill="#4A9079" | ||
/> | ||
<path | ||
d="M56.8703 8H39.4868L17.7995 24.9292L26.6166 32L56.8703 8Z" | ||
id="{kda.foundation.color.icon.brand.logo.default}" | ||
fill="#4A9079" | ||
/> | ||
<path | ||
d="M17.7935 55.9913L7 47.4633V16.537L17.7935 8.00901V55.9913Z" | ||
id="{kda.foundation.color.icon.brand.logo.default}" | ||
fill="#4A9079" | ||
/> | ||
</svg> | ||
); |
59 changes: 59 additions & 0 deletions
59
packages/libs/kode-ui/src/components/SideBar/components/Logo/KadenaLogo.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,59 @@ | ||
import type { FC } from 'react'; | ||
import React from 'react'; | ||
|
||
export const KadenaLogo: FC<{ height: number; className?: string }> = ( | ||
props, | ||
) => ( | ||
<svg | ||
data-style="kdacolor" | ||
viewBox="0 0 225 64" | ||
xmlns="http://www.w3.org/2000/svg" | ||
{...props} | ||
> | ||
<path | ||
id="{kda.foundation.color.text.brand.wordmark.default}" | ||
d="M66.3452 46.2832V17.7139H70.7168V29.5871H71.3924C73.1682 27.6225 76.705 23.6638 82.0089 17.7139H87.7345C85.587 20.0797 81.3068 24.767 74.8938 31.7788C77.118 34.1947 81.5605 39.0295 88.2124 46.2832H82.2891C80.4867 44.2626 76.8555 40.2272 71.3953 34.1682H70.7198V46.2832H66.3481H66.3452Z" | ||
fill="#0F0F0F" | ||
/> | ||
<path | ||
id="{kda.foundation.color.text.brand.wordmark.default}" | ||
d="M89.4012 46.2832C90.7522 41.528 93.4572 32.0029 97.5103 17.7109H105.263C106.614 22.4661 109.319 31.9911 113.372 46.2832H108.838C108.519 45.1681 107.897 42.9233 106.971 39.5487H95.7994C95.5074 40.6637 94.885 42.9086 93.9322 46.2832H89.4012ZM96.9145 35.4838H105.858C105.168 32.9617 103.791 27.9528 101.726 20.4602H101.05C100.36 22.9587 98.9823 27.9646 96.9174 35.4838H96.9145Z" | ||
fill="#0F0F0F" | ||
/> | ||
<path | ||
id="{kda.foundation.color.text.brand.wordmark.default}" | ||
d="M116.159 46.2832V17.7139H127.569C131.36 17.7139 134.26 18.6844 136.274 20.6224C138.313 22.5634 139.336 25.472 139.336 29.3481V34.6873C139.336 38.5929 138.316 41.5015 136.274 43.413C134.26 45.3245 131.357 46.2802 127.569 46.2802H116.159V46.2832ZM120.614 42.2979H127.611C130.074 42.2979 131.903 41.6755 133.097 40.4277C134.289 39.1534 134.885 37.2802 134.885 34.8083V29.1888C134.885 26.6903 134.289 24.8319 133.097 23.6077C131.906 22.3864 130.077 21.7758 127.611 21.7758H120.614V42.2979Z" | ||
fill="#0F0F0F" | ||
/> | ||
<path | ||
id="{kda.foundation.color.text.brand.wordmark.default}" | ||
d="M144.304 46.2832V17.7139H162.233V21.7404H148.676V29.9086H161.121V33.9351H148.676V42.3038H162.434V46.2891H144.304V46.2832Z" | ||
fill="#0F0F0F" | ||
/> | ||
<path | ||
id="{kda.foundation.color.text.brand.wordmark.default}" | ||
d="M167.05 46.2832V17.7139H175.519C176.791 21.9911 179.363 30.531 183.233 43.3363H183.909V17.7139H188.242V46.2861H179.773C178.501 42.0088 175.932 33.4543 172.059 20.6224H171.383V46.2861H167.05V46.2832Z" | ||
fill="#0F0F0F" | ||
/> | ||
<path | ||
id="{kda.foundation.color.text.brand.wordmark.default}" | ||
d="M192.091 46.2832C193.442 41.528 196.147 32.0029 200.201 17.7109H207.953C209.304 22.4661 212.009 31.9911 216.062 46.2832H211.531C211.212 45.1681 210.59 42.9233 209.664 39.5487H198.496C198.204 40.6637 197.581 42.9086 196.628 46.2832H192.094H192.091ZM199.605 35.4838H208.549C207.858 32.9617 206.481 27.9528 204.416 20.4602H203.74C203.05 22.9587 201.673 27.9646 199.608 35.4838H199.605Z" | ||
fill="#0F0F0F" | ||
/> | ||
<path | ||
id="{kda.foundation.color.icon.brand.logo.default}" | ||
d="M57.8702 56L40.4778 55.9911L18.7994 39.0708L27.6165 32L57.8702 56Z" | ||
fill="#4A9079" | ||
/> | ||
<path | ||
id="{kda.foundation.color.icon.brand.logo.default}" | ||
d="M57.8702 8H40.4867L18.7994 24.9292L27.6165 32L57.8702 8Z" | ||
fill="#4A9079" | ||
/> | ||
<path | ||
id="{kda.foundation.color.icon.brand.logo.default}" | ||
d="M18.7935 55.9913L8 47.4633V16.537L18.7935 8.00902V55.9913Z" | ||
fill="#4A9079" | ||
/> | ||
</svg> | ||
); |
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: 14 additions & 8 deletions
22
packages/libs/kode-ui/src/components/SideBar/components/SideBarItem.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 |
---|---|---|
@@ -1,21 +1,27 @@ | ||
import type { FC } from 'react'; | ||
import type { FC, PropsWithChildren, ReactElement } from 'react'; | ||
import React from 'react'; | ||
import { Text } from './../../Typography'; | ||
import { listItemClass } from '../style.css'; | ||
import { Button } from './../../Button'; | ||
|
||
export interface ISideBarItem { | ||
label: string; | ||
export interface ISideBarItem extends PropsWithChildren { | ||
label?: string; | ||
visual?: ReactElement; | ||
isExpanded?: boolean; | ||
} | ||
|
||
export const SideBarItem: FC<ISideBarItem> = ({ | ||
label, | ||
isExpanded = false, | ||
visual, | ||
children, | ||
}) => { | ||
return ( | ||
<li> | ||
<Text> | ||
{label} {isExpanded.toString()} | ||
</Text> | ||
<li className={listItemClass}> | ||
{!isExpanded ? ( | ||
<Button variant="transparent" startVisual={visual} /> | ||
) : ( | ||
children | ||
)} | ||
</li> | ||
); | ||
}; |
24 changes: 24 additions & 0 deletions
24
packages/libs/kode-ui/src/components/SideBar/components/SideBarItemsInline.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,24 @@ | ||
import type { FC, PropsWithChildren } from 'react'; | ||
import React from 'react'; | ||
import { listClass, listItemInlineClass } from '../style.css'; | ||
|
||
export interface ISideBarItemsInline extends PropsWithChildren { | ||
isExpanded?: boolean; | ||
} | ||
export const SideBarItemsInline: FC<ISideBarItemsInline> = ({ | ||
children, | ||
isExpanded = false, | ||
}) => { | ||
return ( | ||
<li className={listItemInlineClass}> | ||
<ul | ||
className={listClass({ direction: 'horizontal', expanded: isExpanded })} | ||
> | ||
{React.Children.map(children, (child) => { | ||
if (!React.isValidElement(child)) return null; | ||
return React.cloneElement(child, { ...child.props, isExpanded }); | ||
})} | ||
</ul> | ||
</li> | ||
); | ||
}; |
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.