Skip to content

Commit

Permalink
use reactnode instead of string as children
Browse files Browse the repository at this point in the history
  • Loading branch information
vassbence committed Jul 24, 2024
1 parent cdda573 commit 3a7f10a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/components/Button/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useState } from 'react'
import { ReactNode, useState } from 'react'
import { radius } from '../../utils/radius.js'
import { Icon, IconProps } from '../Icon/index.js'
import { Text } from '../Text/index.js'
Expand All @@ -8,7 +8,7 @@ import { KeyHint, KeyHintProps } from '../KeyHint/index.js'
import { styled } from 'inlines'

type ButtonProps = {
children: string
children: ReactNode
onClick: () => void | Promise<void>
disabled?: boolean
variant?: 'primary' | 'secondary' | 'ghost'
Expand Down
3 changes: 2 additions & 1 deletion src/components/Text/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { ReactNode } from 'react'
import { Color, colors } from '../../utils/colors.js'

type TextProps = {
children: string
children: ReactNode
variant?:
| 'display-regular'
| 'display-medium'
Expand Down

0 comments on commit 3a7f10a

Please sign in to comment.