Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce the thickness of the Hr component #1036

Merged
merged 1 commit into from
Jul 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/seven-radios-help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sumup/circuit-ui': minor
---

Reduced the thickness of the Hr (horizontal rule) component.
10 changes: 5 additions & 5 deletions packages/circuit-ui/components/Hr/Hr.docs.mdx
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import { Status, Props, Story } from '../../../../.storybook/components';

# HR
# Hr

<Status.Stable />

HR provides a visual line that separates content into sections
A horizontal rule visually and semantically separates content into sections.

<Story id="components-hr--base" />
<Props />

## When to use it

Use it when you need to separate different sections of a certain content within a body text or a list of data within a card.
Use it when you need to separate different sections of content within body copy or a list of data within a card.

## Usage guidelines

- **Do** proper space the HR from the sections to make sure the division is clear
- **Do not** use HR to separate totally different content, it is used to break sections on a related content
- **Do** properly space the HR from the sections to make sure the division is clear
- **Do not** use HR to separate totally different content, it is used to break sections of related content
5 changes: 3 additions & 2 deletions packages/circuit-ui/components/Hr/Hr.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ const baseStyles = ({ theme }: StyleProps) => css`
label: hr;
display: block;
width: 100%;
border: 1px solid ${theme.colors.n300};
border: 0;
connor-baer marked this conversation as resolved.
Show resolved Hide resolved
border-top: 1px solid ${theme.colors.n300};
margin-top: ${theme.spacings.mega};
margin-bottom: ${theme.spacings.mega};
`;

/**
* A horizontal rule to visually and semantically separate text.
* A horizontal rule to visually and semantically separate content.
*/
export const Hr = styled('hr')<NoTheme>(baseStyles);
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ exports[`Hr should render with default styles 1`] = `
.circuit-0 {
display: block;
width: 100%;
border: 1px solid #CCC;
border: 0;
border-top: 1px solid #CCC;
margin-top: 16px;
margin-bottom: 16px;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ exports[`Separator should render with default styles 1`] = `
.circuit-0 {
display: block;
width: 100%;
border: 1px solid #CCC;
border: 0;
border-top: 1px solid #CCC;
margin-top: 16px;
margin-bottom: 16px;
border: 1px solid #666;
Expand Down