Skip to content

Make design system#42

Open
nikita1tup wants to merge 1 commit into
devfrom
feature/design-system
Open

Make design system#42
nikita1tup wants to merge 1 commit into
devfrom
feature/design-system

Conversation

@nikita1tup
Copy link
Copy Markdown
Collaborator

Closes #27

@nikita1tup nikita1tup self-assigned this May 27, 2026
@nikita1tup nikita1tup requested a review from ardier16 as a code owner May 27, 2026 12:59
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No index file needed


export type UiCardProps = CardProps

export const UiCard = Object.assign((props: UiCardProps) => <Card {...props} />, {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to override Card if no changes to the component needed, we can use Card component from Hero UI directly

Comment on lines +4 to +16
export interface UiModalProps {
isOpen?: boolean
defaultOpen?: boolean
onOpenChange?: (isOpen: boolean) => void
title?: ReactNode
children?: ReactNode
footer?: ReactNode
trigger?: ReactNode
size?: ModalContainerProps['size']
placement?: ModalContainerProps['placement']
isDismissable?: boolean
showCloseButton?: boolean
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use ModalProps from Hero UI

}: UiButtonProps) {
return (
<Button isDisabled={isDisabled || isLoading} {...props}>
{isLoading ? <Spinner size='sm' color='current' aria-hidden /> : startContent}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<Button isDisabled={isDisabled || isLoading} {...props}>
{isLoading ? <Spinner size='sm' color='current' aria-hidden /> : startContent}
{isLoading ? (loadingText ?? children) : children}
{!isLoading && endContent}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

startContent and endContent can be passed as children?


export type UiTableProps = TableProps

export const UiTable = Object.assign((props: UiTableProps) => <Table {...props} />, {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to re-export

endContent?: ReactNode
}

export function UiInput({
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's name it UitextField to respect Hero UI original name

Comment on lines +21 to +36
export interface UiSelectProps {
options: UiSelectOption[]
label?: ReactNode
placeholder?: string
description?: ReactNode
errorMessage?: ReactNode
isInvalid?: boolean
isDisabled?: boolean
isRequired?: boolean
withSearch?: boolean
name?: string
className?: string
value?: UiSelectKey | null
defaultValue?: UiSelectKey | null
onChange?: (key: UiSelectKey | null) => void
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check which props we can extend from Hero UI SelectProps


if (withSearch) {
return (
<ComboBox
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's have is as a separate UiCombobox component

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check the border radii of components in design system, they are more square in design

@ardier16 ardier16 requested a review from lilbonekit May 29, 2026 10:33
Comment on lines +70 to +76
const componentName =
name
.toLowerCase()
.replace(/ /g, '-')
.replace(/(^\w|-\w)/g, c => c.toUpperCase())
.replace(/-/g, '') + 'Icon'
const filePath = `./src/components/icons/${componentName}.tsx`
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can component name actually contain spaces? Looking at existing icons, it seems we always use PascalCase names. If that's true, do we need all this normalization logic?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And add one-line comment or name regEx describing the component case

Dashboard: '/',
Borrow: '/borrow',
Supply: '/supply',
DesignSystem: '/design-system',
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure it is visible only in DEV mode

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

Is this hover color from design? It's too heavy, consider using a softer color

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And recheck others

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants