Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

use Text component

Blue Mouse4e89bbc78e2f
diff --git a/web/app/pages/Project/FeatureFlags/View/FeatureFlagsView.tsx b/web/app/pages/Project/FeatureFlags/View/FeatureFlagsView.tsx
index 2728cb2ed..fdd8875fe 100644
--- a/web/app/pages/Project/FeatureFlags/View/FeatureFlagsView.tsx
+++ b/web/app/pages/Project/FeatureFlags/View/FeatureFlagsView.tsx
@@ -348,7 +348,9 @@ const FeatureFlagRow = ({
{/* Result filter toggle */}
<div className='mb-3 flex items-center gap-2'>
<Switch checked={resultFilter} onChange={(checked) => onResultFilterChange(flag.id, checked)} />
- <span className='text-xs text-gray-500 dark:text-gray-400'>{t('featureFlags.served')}</span>
+ <Text as='span' size='xs' colour='muted'>
+ {t('featureFlags.served')}
+ </Text>
</div>
{profilesLoading && profiles.length === 0 ? (
diff --git a/web/app/ui/Switch.tsx b/web/app/ui/Switch.tsx
index 6eac5206e..6f1ee4ea9 100644
--- a/web/app/ui/Switch.tsx
+++ b/web/app/ui/Switch.tsx
@@ -1,5 +1,7 @@
import cx from 'clsx'
+import { Text } from '~/ui/Text'
+
interface SwitchProps {
checked: boolean
onChange: (checked: boolean) => void
@@ -48,15 +50,18 @@ export const Switch = ({ checked, onChange, disabled = false, className, label,
/>
</button>
{label ? (
- <label
+ <Text
+ as='label'
+ size='sm'
+ colour='primary'
htmlFor={switchId}
- className={cx('ml-2 text-sm text-gray-900 dark:text-gray-100', {
+ className={cx('ml-2', {
'cursor-pointer': !disabled,
'cursor-not-allowed opacity-50': disabled,
})}
>
{label}
- </label>
+ </Text>
) : null}
</div>
)