Skip to content

Commit

Permalink
refactor: moved input-style-generator utils to utils folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Amiditin committed Sep 23, 2024
1 parent f21eaf9 commit 0d9e213
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import type { InputColorSchemes } from '../input-generator.interfaces.js'

import { writeFileSync } from 'fs'
import { writeFileSync } from 'fs'

import { pretty } from '@atls-ui-generators/utils'
import { getStylesName } from '@atls-ui-generators/utils'
import { pretty } from '@atls-ui-generators/utils'

const getAppearanceStylesName = (variant: string, state: string): string =>
getStylesName('appearance', variant, state)
import { capitalizeFirstLetter } from '../utils/index.js'
import { getAppearanceStylesName } from '../utils/index.js'

export class InputAppearanceStyleGenerator {
readonly requiredImports = [
Expand Down
2 changes: 2 additions & 0 deletions generators/input/src/utils/capitalize-first-letter.util.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export const capitalizeFirstLetter = (string: string): string =>
string.charAt(0).toUpperCase() + string.slice(1)
4 changes: 4 additions & 0 deletions generators/input/src/utils/get-appearance-styles-name.util.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { getStylesName } from '@atls-ui-generators/utils'

export const getAppearanceStylesName = (variant: string, state: string): string =>
getStylesName('appearance', variant, state)
2 changes: 2 additions & 0 deletions generators/input/src/utils/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './capitalize-first-letter.util.js'
export * from './get-appearance-styles-name.util.js'

0 comments on commit 0d9e213

Please sign in to comment.