Skip to content

Commit

Permalink
fix: 🏷️ fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
okineadev committed Dec 10, 2024
1 parent 9cee335 commit 95f95f4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"module": "src/index.tsx",
"main": "dist/index.js",
"types": "index.d.ts",
"types": "dist/index.d.ts",
"scripts": {
"lint": "biome check --fix",
"format": "biome format --write .",
Expand Down
12 changes: 7 additions & 5 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Text, Box, type BoxProps, type TextProps } from 'ink'
/**
* Props for the Divider component.
*/
export interface DividerProps extends BoxProps {
export interface DividerProps {
/**
* Title shown in the middle of the divider.
*
Expand Down Expand Up @@ -53,13 +53,15 @@ export interface DividerProps extends BoxProps {
* @default 'gray'
*/
dividerColor?: BoxProps['borderColor']

boxProps?: BoxProps
}

const BaseDivider: React.FC<DividerProps> = ({
width = 'auto',
dividerChar,
dividerColor = 'gray',
...props
boxProps,
}) => (
<Box
width={width}
Expand All @@ -77,7 +79,7 @@ const BaseDivider: React.FC<DividerProps> = ({
borderLeft={false}
borderRight={false}
//
{...props}
{...boxProps}
/>
)

Expand All @@ -95,13 +97,13 @@ const Divider: React.FC<DividerProps> = ({
titleColor = 'white',
dividerChar = '─',
dividerColor = 'gray',
...props
boxProps,
}) => {
const dividerLine = (
<BaseDivider
dividerChar={dividerChar}
dividerColor={dividerColor}
{...props}
boxProps={boxProps}
/>
)

Expand Down

0 comments on commit 95f95f4

Please sign in to comment.