Skip to content

Commit

Permalink
Merge pull request #3735 from kiwicom/chore/misc-fixes
Browse files Browse the repository at this point in the history
Fix Accordion Story + export StyledLabel from Radio + add default value to element prop in StyledText
  • Loading branch information
mainframev committed Feb 10, 2023
2 parents a9571da + 723dd5d commit b4999c3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
@@ -1,4 +1,5 @@
import React from "react";
import { action } from "@storybook/addon-actions";

import Text from "../Text";
import Button from "../Button";
Expand Down
2 changes: 1 addition & 1 deletion packages/orbit-components/src/Radio/index.tsx
Expand Up @@ -146,7 +146,7 @@ StyledInput.defaultProps = {
theme: defaultTheme,
};

const StyledLabel = styled(({ disabled, theme, type, hasError, ...props }) => (
export const StyledLabel = styled(({ disabled, theme, type, hasError, ...props }) => (
<label {...props}>{props.children}</label>
))`
${({ theme, disabled }) => css`
Expand Down
12 changes: 7 additions & 5 deletions packages/orbit-components/src/Text/index.tsx
Expand Up @@ -75,11 +75,13 @@ const getLineHeightToken = ({
return lineHeightTokens[size];
};

export const StyledText = styled(({ element: TextElement, children, className, dataTest, id }) => (
<TextElement className={className} data-test={dataTest} id={id}>
{children}
</TextElement>
))`
export const StyledText = styled(
({ element: TextElement = ELEMENT_OPTIONS.P, children, className, dataTest, id }) => (
<TextElement className={className} data-test={dataTest} id={id}>
{children}
</TextElement>
),
)`
${({
theme,
align,
Expand Down

0 comments on commit b4999c3

Please sign in to comment.