Skip to content

Commit

Permalink
feat(text-input): setup theme/light option
Browse files Browse the repository at this point in the history
  • Loading branch information
felipebritor committed Apr 15, 2023
1 parent f9f811d commit e9d5da6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/CvTextInput/CvTextInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
`${carbonPrefix}--text-input`,
{
[`${carbonPrefix}--text-input--invalid`]: isInvalid,
[`${carbonPrefix}--text-input--light`]: isLight,
[`${carbonPrefix}--text-input--warning`]: isWarn,
},
]"
Expand Down Expand Up @@ -69,6 +70,7 @@
import { onBeforeMount, onBeforeUpdate, ref, useSlots } from 'vue';
import { carbonPrefix } from '../../global/settings';
import { useCvId, props as propsCvId } from '../../use/cvId';
import { useIsLight, props as propsTheme } from '../../use/cvTheme';
import { WarningFilled16, WarningAltFilled16 } from '@carbon/icons-vue';
const props = defineProps({
Expand All @@ -78,6 +80,7 @@ const props = defineProps({
modelValue: String,
warnText: { type: String, default: undefined },
...propsCvId,
...propsTheme,
});
const cvId = useCvId(props);
Expand All @@ -86,6 +89,7 @@ const slots = useSlots();
const isInvalid = ref(false);
const isWarn = ref(false);
const isHelper = ref(false);
const isLight = useIsLight(props);
function updateMessageFlags() {
isInvalid.value = !!(
Expand Down

0 comments on commit e9d5da6

Please sign in to comment.