Skip to content

Conversation

@colebemis
Copy link
Contributor

@colebemis colebemis commented Mar 1, 2022

Summary

Implements a bare-bones Hero component.

CleanShot 2022-03-04 at 00 02 35@2x

Next steps

Tracked in https://github.com/github/primer/issues/747

  • Font (Alliance No. 1)
  • CTA links
  • Colors
  • Extract global styles

@changeset-bot
Copy link

changeset-bot bot commented Mar 1, 2022

⚠️ No Changeset found

Latest commit: 2886882

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Blazing fast cloud
<br />
developer environments
</>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

heading and description accept a string or a React element to allow marketing to control linebreaks if necessary

Copy link
Collaborator

Choose a reason for hiding this comment

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

ahh that makes sense.. great idea 👍

Copy link
Collaborator

Choose a reason for hiding this comment

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

A potential downside to markup-based linebreaks could be responsive behaviour? Would it be better to recommend granular control via css instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A potential downside to markup-based linebreaks could be responsive behaviour? Would it be better to recommend granular control via css instead?

Maybe. We use linebreaks in other marketing sites so I wanted to enable that for now. But I'm open to changing this if we find a better CSS solution later.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2022

Azure Static Web Apps: Your stage site is ready! Visit it here: https://green-tree-0cc944a10-6.centralus.1.azurestaticapps.net

@colebemis colebemis changed the title Hero component Implement bare-bones Hero component Mar 4, 2022
@colebemis colebemis requested a review from rezrah March 4, 2022 08:04
@colebemis colebemis added the react label Mar 4, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2022

Azure Static Web Apps: Your stage site is ready! Visit it here: https://green-tree-0cc944a10-6.centralus.1.azurestaticapps.net

@colebemis colebemis marked this pull request as ready for review March 4, 2022 08:05
type Props = {
children: React.ReactNode
export type HeroProps = {
heading: string | React.ReactElement
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you use React.ReactNode instead, which should cover both?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't use ReactNode because it includes a lot of types that don't make sense for heading

CleanShot 2022-03-10 at 09 51 06

@langermank
Copy link
Contributor

@colebemis I have a test dist going for tokens in a draft primitives PR. So far I've only built CSS variables- is that the format you plan to use in this package? Its messy right now and constantly changing as I push new stuff, but you can start pulling them in if you want to play 🙂 primer/primitives#297

@colebemis colebemis merged commit feff178 into main Mar 11, 2022
@colebemis colebemis deleted the hero branch March 11, 2022 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants