Skip to content
This repository has been archived by the owner on Dec 6, 2022. It is now read-only.

feat: Added src-divider #912

Merged
merged 25 commits into from
Sep 28, 2021
Merged

feat: Added src-divider #912

merged 25 commits into from
Sep 28, 2021

Conversation

oliverlloyd
Copy link
Contributor

@oliverlloyd oliverlloyd commented Aug 6, 2021

Divider

Inserts a line on the page acting as a section break dividing content

Install

$ yarn add @guardian/src-divider

Use

import { Divider } from '@guardian/src-divider';

const Content = () => (
    <>
        <p>Some text</p>
        <Divider />
        <p>Some text</p>
        <Divider
            size="small"
            spaceAbove="loose"
            displayText="I am centered inside the divider"
        />
        <p>Some text</p>
    </>
);

Divider Props

size

'partial' | 'full'

full means the divider will span the full width of the content
partual left aligns the divider and limits its length

spaceAbove

'tight' | 'loose'

How much space is given above the divider

displayText

string

This text is centered inside the dividing line

@oliverlloyd oliverlloyd requested a review from a team as a code owner August 6, 2021 09:56
@oliverlloyd
Copy link
Contributor Author

Relates to #814

@probot-autolabeler probot-autolabeler bot added Button Changes to the button component Choice card Changes to the choice card component foundations Affects @guardian/source-foundations labels Aug 6, 2021
oliverlloyd and others added 3 commits August 6, 2021 13:44
Co-authored-by: Simon Adcock <simonadcock2@gmail.com>
Co-authored-by: Simon Adcock <simonadcock2@gmail.com>
Co-authored-by: Simon Adcock <simonadcock2@gmail.com>
oliverlloyd and others added 4 commits August 6, 2021 14:05
Co-authored-by: Simon Adcock <simonadcock2@gmail.com>
Co-authored-by: Simon Adcock <simonadcock2@gmail.com>
Co-authored-by: Simon Adcock <simonadcock2@gmail.com>
@oliverlloyd
Copy link
Contributor Author

@SiAdcock where did we end up on the layout / not layout discussion? Are you okay keeping this divider as it's own thing?

@SiAdcock
Copy link
Contributor

SiAdcock commented Sep 21, 2021

@oliverlloyd what do you think about adding this to the Development Kitchen (#963)?

To answer your previous question, for now I think Divider makes sense as its own thing

@oliverlloyd
Copy link
Contributor Author

what do you think about adding this to the Development Kitchen

👍 I'll cook something up

@probot-autolabeler probot-autolabeler bot added the kitchen Affects @guardian/source-react-components-development-kitchen label Sep 23, 2021
@sndrs
Copy link
Member

sndrs commented Sep 23, 2021

👍 I'll cook something up

👨‍🍳👌

Copy link
Contributor

@SiAdcock SiAdcock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lovely stuff, thanks @oliverlloyd . Divide. Conquer. 👍

@oliverlloyd oliverlloyd merged commit 8c1ec01 into main Sep 28, 2021
@oliverlloyd oliverlloyd deleted the oliver/src-divider branch September 28, 2021 12:11
@mxdvl mxdvl mentioned this pull request Oct 6, 2021
10 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Button Changes to the button component Choice card Changes to the choice card component foundations Affects @guardian/source-foundations kitchen Affects @guardian/source-react-components-development-kitchen
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants