Skip to main content
Glama
deleonio
by deleonio
basic.tsx1.9 kB
import type { AlertTypePropType, AlertVariantPropType, HeadingLevel } from '@public-ui/components'; import { KolAlert } from '@public-ui/react-v19'; import type { FC } from 'react'; import React from 'react'; import { SampleDescription } from '../SampleDescription'; type PropsByType = { level: HeadingLevel; type: AlertTypePropType; variant: AlertVariantPropType; }; type PropsBasic = { variant?: AlertVariantPropType; }; const AlertByType: FC<PropsByType> = ({ level, type, variant }) => ( <> <KolAlert _label={`This is the headline level ${level} of the alert.`} _level={level} _type={type} _variant={variant}> This is the text of the alert. </KolAlert> <KolAlert _type={type} _variant={variant}> In this alert, only the text without the heading is used. </KolAlert> <KolAlert _label={`This is the headline level ${level} of the alert.`} _level={level} _type={type} _variant={variant} _hasCloser> This is the text of the alert. With close button. </KolAlert> <KolAlert _type={type} _variant={variant} _hasCloser> In this alert, only the text without the heading is used. With close button. </KolAlert> </> ); export const AlertVariants: FC<PropsBasic> = ({ variant = 'msg' }) => ( <div className="grid gap-4"> <AlertByType level={1} type="default" variant={variant} /> <AlertByType level={2} type="error" variant={variant} /> <AlertByType level={3} type="info" variant={variant} /> <AlertByType level={4} type="success" variant={variant} /> <AlertByType level={5} type="warning" variant={variant} /> </div> ); export const AlertBasic: FC<PropsBasic> = () => ( <> <SampleDescription> <p> KolAlert shows messages of different types. This sample illustrates the variant <code>msg</code>, showing all possible types with and without headlines and close buttons. </p> </SampleDescription> <AlertVariants variant="msg" /> </> );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/deleonio/public-ui-kolibri'

If you have feedback or need assistance with the MCP directory API, please join our Discord server