Skip to content

Commit

Permalink
feat: can disable color by none color for uText
Browse files Browse the repository at this point in the history
  • Loading branch information
snowyu committed Sep 19, 2024
1 parent 141722f commit 985c95b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/u-text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ export function uText(s: string, options: any= {}) {
}
// horizontalLayout: 'default',
// verticalLayout: 'default',
return colors[color as any](
textSync(s, options)
);
let result = textSync(s, options)
if (color !== 'none') {
result = colors[color as any](result)
}
return result
}

// import cfonts from 'cfonts'
Expand Down

0 comments on commit 985c95b

Please # to comment.