supabase / ui

Supabase UI Library

Home Page:ui-storybook-pre-release.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Badge w/ dot and color has square background of badge

plondon opened this issue · comments

Bug report

When setting dot prop && color of a badge, the result is an awkward square background around dot.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Add Badge
  2. set dot prop to true w/ any color
<Badge color='green' dot>Hello World</Badge>

Expected behavior

Maybe the background should have a rounded radius? Or not exist at all.

Screenshots

Screen Shot 2022-11-03 at 9 57 38 AM

System information

  • OS: [e.g. macOS]
  • Browser (if applies) [e.g. chrome, safari]
  • supabase/ui latest

Additional context

The docs look ok because no color is set so sbui-badge--[red, green, yellow, etc...] is undefined.

Screen Shot 2022-11-03 at 9 58 48 AM

This is due to the sbui-badge--${color} being applied to the SVG, which gives the background color for the component wrapper.

- className={`${BadgeStyles[`sbui-badge-dot`]} ${
-   BadgeStyles[`sbui-badge--${color}`]
- }`}
+ className={`${BadgeStyles[`sbui-badge-dot`]}`}

className={`${BadgeStyles[`sbui-badge-dot`]} ${
BadgeStyles[`sbui-badge--${color}`]
}`}

Supabase UI is being deprecated.

As part of that, we are closing issues in this repo that are perhaps outdated.

If you'd like to still make an issue, you could consider making an issue for our package in our monorepo https://github.com/supabase/supabase/tree/master/packages/ui


We are moving the components to the main mono repo at https://github.com/supabase/supabase.

The auth component has been moved to it's own repo and package. https://github.com/supabase-community/auth-ui. You can also read the docs for auth ui here.