diff --git a/components/ServiceTag.tsx b/components/ServiceTag.tsx new file mode 100644 index 0000000000000000000000000000000000000000..797487e6d5dc92f6d0a5667849048185e5b4d896 --- /dev/null +++ b/components/ServiceTag.tsx @@ -0,0 +1,18 @@ +import Chip from '@/components/Chip' +import { Tag } from 'types/content/' +import { translateLabel, translateTag } from '@/lib/utils/labelHelper' + +type ServiceTagOptions = { + tag: Tag, + style: string +} + +const formatLabel = (tag: Tag) => { + return `${translateLabel(tag.name)}: ${translateTag(tag)}` +} + +export default ({ tag, style }: ServiceTagOptions) => { + return ( + <Chip text={formatLabel(tag)} style={`${style} capitalize ${tag.name == 'label' && tag.value == 'external' ? 'hidden' : ''}`} /> + ) +} diff --git a/pages/standards/components/PageHeaderCard.tsx b/components/it-standards/PageHeaderCard.tsx similarity index 100% rename from pages/standards/components/PageHeaderCard.tsx rename to components/it-standards/PageHeaderCard.tsx diff --git a/components/it-standards/ServiceTag.tsx b/components/it-standards/ServiceTag.tsx deleted file mode 100644 index 922da9f50195e658c6c33d862746d593a56fb848..0000000000000000000000000000000000000000 --- a/components/it-standards/ServiceTag.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import { Tag } from 'types/content/' -import LifecyclePicture from '@/components/it-standards/LifecyclePicture' - -type ServiceTagOptions = { - tag: Tag, - style: string -} - -export default ({ tag, style }: ServiceTagOptions) => { - /* beim tag 'status' soll das zugehĂśrige Lebenszyklus-Bild ausgegeben werden */ - if (tag.name == 'status') { - return ( - <LifecyclePicture {...tag } /> - ) - } -}