diff --git a/frontend/src/app/main/ui/ds/foundations/typography/text.cljs b/frontend/src/app/main/ui/ds/foundations/typography/text.cljs index e5e24907c..6f9baa2dd 100644 --- a/frontend/src/app/main/ui/ds/foundations/typography/text.cljs +++ b/frontend/src/app/main/ui/ds/foundations/typography/text.cljs @@ -22,7 +22,7 @@ (assert (valid-typography? (dm/str typography)) (dm/str typography " is an unknown typography")) - (let [as (or as "p") + (let [as (if (or (empty? as) (nil? as)) "p" as) class (dm/str (or class "") " " (stl/css-case :display-typography (= typography t/display) :title-large-typography (= typography t/title-large) :title-medium-typography (= typography t/title-medium) diff --git a/frontend/src/app/main/ui/ds/foundations/typography/text.mdx b/frontend/src/app/main/ui/ds/foundations/typography/text.mdx index 52c97e52d..1abe72cc1 100644 --- a/frontend/src/app/main/ui/ds/foundations/typography/text.mdx +++ b/frontend/src/app/main/ui/ds/foundations/typography/text.mdx @@ -8,14 +8,6 @@ This component will add a text element to our code that will match the tag prop. ## Technical notes -This components accepts to props: - -- `tag` (default value: `p`) : Give a proper tag name (i.e. `p`, `span`, etc.). -- `typography` (mandatory): Any of the [supported typography IDs](?path=/docs/foundations-typography--docs). - -You can check passed props to renderized components on hover `tag / typography` - - ### Using typography IDs There are typography ID definitions you can use in your code rather than typing the @@ -35,5 +27,5 @@ Assuming the namespace of the typography is required as `t`: You can now use the typography IDs defined in the namespace: ```clj -[:> text* {:typography t/title-large :tag "p"} "Welcome to Penpot"] +[:> text* {:typography t/title-large :as "p"} "Welcome to Penpot"] ```