@@ -68,3 +68,140 @@ export default {
6868 },
6969};
7070 </script >
71+
72+ <style lang="scss">
73+ .h-badge {
74+ --h-badge--width : fit-content ;
75+ --h-badge--height : fit-content ;
76+
77+ align-items : center ;
78+ background-color : var (--h-badge--background-color );
79+ border-radius : 50% ;
80+ color : var (--h-badge--color );
81+ display : flex ;
82+ font-size : var (--h-badge--font-size );
83+ font-weight : bold ;
84+ min-height : var (--h-badge--height );
85+ max-height : fit-content ;
86+ justify-content : center ;
87+ max-width : fit-content ;
88+ min-width : var (--h-badge--width );
89+ padding : var (--h-badge--padding );
90+ position : relative ;
91+
92+ & --size {
93+ & -medium {
94+ --h-badge--font-size : calc (var (--size-base-medium ) / 2 );
95+ --h-badge--padding : calc (var (--size-base-medium ) / 8 );
96+ --h-badge--width : var (--size-base-medium );
97+ --h-badge--height : var (--size-base-medium );
98+ }
99+ & -large {
100+ --h-badge--font-size : calc (var (--size-base-large ) / 2 );
101+ --h-badge--padding : calc (var (--size-base-large ) / 8 );
102+ --h-badge--width : var (--size-base-large );
103+ --h-badge--height : var (--size-base-large );
104+ }
105+ & -extra-large {
106+ --h-badge--font-size : calc (var (--size-base-extra-large ) / 2 );
107+ --h-badge--padding : calc (var (--size-base-extra-large ) / 8 );
108+ --h-badge--width : var (--size-base-extra-large );
109+ --h-badge--height : var (--size-base-extra-large );
110+ }
111+ & -jumbo {
112+ --h-badge--font-size : calc (var (--size-base-jumbo ) / 2 );
113+ --h-badge--padding : calc (var (--size-base-jumbo ) / 8 );
114+ --h-badge--width : var (--size-base-jumbo );
115+ --h-badge--height : var (--size-base-jumbo );
116+ }
117+ & -extra-jumbo {
118+ --h-badge--font-size : calc (var (--size-base-extra-jumbo ) / 2 );
119+ --h-badge--padding : calc (var (--size-base-extra-jumbo ) / 8 );
120+ --h-badge--width : var (--size-base-extra-jumbo );
121+ --h-badge--height : var (--size-base-extra-jumbo );
122+ }
123+ & -giant {
124+ --h-badge--font-size : calc (var (--size-base-giant ) / 2 );
125+ --h-badge--padding : calc (var (--size-base-giant ) / 8 );
126+ --h-badge--width : var (--size-base-giant );
127+ --h-badge--height : var (--size-base-giant );
128+ }
129+ & -extra-giant {
130+ --h-badge--font-size : calc (var (--size-base-extra-giant ) / 2 );
131+ --h-badge--padding : calc (var (--size-base-extra-giant ) / 8 );
132+ --h-badge--width : var (--size-base-extra-giant );
133+ --h-badge--height : var (--size-base-extra-giant );
134+ }
135+ & -colossal {
136+ --h-badge--font-size : calc (var (--size-base-colossal ) / 2 );
137+ --h-badge--padding : calc (var (--size-base-colossal ) / 8 );
138+ --h-badge--width : var (--size-base-colossal );
139+ --h-badge--height : var (--size-base-colossal );
140+ }
141+ & -extra-colossal {
142+ --h-badge--font-size : calc (var (--size-base-extra-colossal ) / 2 );
143+ --h-badge--padding : calc (var (--size-base-extra-colossal ) / 8 );
144+ --h-badge--width : var (--size-base-extra-colossal );
145+ --h-badge--height : var (--size-base-extra-colossal );
146+ }
147+ & -mega {
148+ --h-badge--font-size : calc (var (--size-base-mega ) / 2 );
149+ --h-badge--padding : calc (var (--size-base-mega ) / 8 );
150+ --h-badge--width : var (--size-base-mega );
151+ --h-badge--height : var (--size-base-mega );
152+ }
153+ & -extra-mega {
154+ --h-badge--font-size : calc (var (--size-base-extra-mega ) / 2 );
155+ --h-badge--padding : calc (var (--size-base-extra-mega ) / 8 );
156+ --h-badge--width : var (--size-base-extra-mega );
157+ --h-badge--height : var (--size-base-extra-mega );
158+ }
159+ & -immense {
160+ --h-badge--font-size : calc (var (--size-base-immense ) / 2 );
161+ --h-badge--padding : calc (var (--size-base-immense ) / 8 );
162+ --h-badge--width : var (--size-base-immense );
163+ --h-badge--height : var (--size-base-immense );
164+ }
165+ }
166+
167+ & --variant {
168+ & -default {
169+ --h-badge--background-color : var (--color-theme-secondary );
170+ --h-badge--color : var (--colors-original-white );
171+ }
172+
173+ & -success {
174+ --h-badge--background-color : var (--color-theme-success );
175+ }
176+
177+ & -info {
178+ --h-badge--background-color : var (--color-theme-info );
179+ }
180+
181+ & -danger {
182+ --h-badge--background-color : var (--color-theme-danger );
183+ }
184+
185+ & -warn {
186+ --h-badge--background-color : var (--color-theme-warn );
187+ }
188+
189+ & -primary {
190+ --h-badge--background-color : var (--color-theme-primary );
191+ --h-badge--color : var (--colors-original-white );
192+ }
193+
194+ & -secondary {
195+ --h-badge--background-color : var (--color-theme-secondary );
196+ }
197+
198+ & -tertiary {
199+ --h-badge--background-color : var (--color-theme-tertiary );
200+ }
201+ }
202+ }
203+
204+ .h-badge__icon {
205+ margin-left : var (--size-base-extra-small );
206+ }
207+ </style >
0 commit comments