-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Provider): rewrite to TypeScript
- Loading branch information
1 parent
fc21a1d
commit 6bddb2b
Showing
12 changed files
with
357 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
packages/dnb-eufemia/src/components/form-row/FormRowHelpers.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { isTrue } from '../../shared/component-helper' | ||
|
||
type FormRowProps = { | ||
label_direction?: string | ||
vertical?: string | ||
} | ||
|
||
export const prepareFormRowContext = (props: FormRowProps) => { | ||
if (typeof props.label_direction === 'undefined') { | ||
props.label_direction = isTrue(props.vertical) | ||
? 'vertical' | ||
: props.label_direction | ||
} | ||
return props | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// to replace icon names | ||
export const iconCase = (name) => | ||
name | ||
.replace(/((?!^)[A-Z])/g, '_$1') | ||
.toLowerCase() | ||
.replace(/^[0-9]/g, '$1') | ||
.replace(/[^a-z0-9_]/gi, '_') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.