Skip to content

Commit

Permalink
Merge pull request #160 from deven-org/feat/blr-hint-component
Browse files Browse the repository at this point in the history
feat: initial form hint component css will be added from input text c…
  • Loading branch information
kundan0887 authored Apr 3, 2023
2 parents 8d03eb7 + f0d5936 commit a833c97
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions packages/ui-library/src/components/form-hint/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { html } from 'lit';
import { classMap } from 'lit/directives/class-map.js';

type HintVariant = 'hint' | 'error';

type FormHintType = {
message: string;
variant: HintVariant;
};

export const BlrFormHint = ({ message, variant }: FormHintType) => {
const classes = classMap({
[`${variant}`]: variant,
});

return html`
<span class="blr-form-hint ${classes}">
<blr-icon name="${variant === 'error' ? 'blr360Xl' : 'blr360Xl'}"></blr-icon>
<span>${message}</span>
</span>
`;
};

0 comments on commit a833c97

Please sign in to comment.