Rebuild-Black-Business / RBB-Website

Website to help connect black-owned businesses with consumers and resources
https://www.rebuildblackbusiness.com/
MIT License
118 stars 73 forks source link

Create ResultCard component structure #22

Closed magnificode closed 4 years ago

magnificode commented 4 years ago

Trello: https://trello.com/c/g5OZn1z8

The ResultCard has two variations:

ResultCard Default State

Screen Shot 2020-06-05 at 10 50 53 AM

The ResultCard default state should output the following data from Airtable:

ResultCard Basic

Screen Shot 2020-06-05 at 11 00 29 AM

This variation does not utilize a Business image, but instead leverages a background color.

chaance commented 4 years ago

On it

chaance commented 4 years ago

Starting out with a generic, composable set of Card components. You can opt in or out to any of the sub components pretty easily, and override whatever you need on the sub-component itself. Later this evening I'll circle back here and abstract this into a higher-level API for the result card.

function Layout() {
  return (
    <Grid templateColumns="repeat(2, 1fr)" gap={6} ml={10}>
      <CardWrapper>
        <CardImage src="https://picsum.photos/900/900" />
        <CardContent bg="lightgray">
          <CardHeading>Ultrices vehicula cubilia euismod</CardHeading>
          <CardText>
            Urna ad aliquet taciti dapibus rutrum morbi iaculis ut, lacinia sit
            luctus leo posuere montes torquent, mi ligula lacus inceptos
            pharetra vitae augue.
          </CardText>
          <CardButtonGroup>
            <CardButton>Click Me</CardButton>
            <CardButton>Click Me Too</CardButton>
          </CardButtonGroup>
        </CardContent>
      </CardWrapper>
      <CardWrapper>
        <CardContent bg="#424242" color="white">
          <CardHeading>Ultrices vehicula cubilia euismod</CardHeading>
          <CardText>
            Urna ad aliquet taciti dapibus rutrum morbi iaculis ut, lacinia sit
            luctus leo posuere montes torquent, mi ligula lacus inceptos
            pharetra vitae augue.
          </CardText>
          <CardButtonGroup>
            <CardButton>Click Me</CardButton>
            <CardButton>Click Me Too</CardButton>
          </CardButtonGroup>
          <Text as="p" fontSize="sm" fontStyle="italic" mt={3}>
            Velit gravida est senectus mollis nunc adipiscing nulla magna nec
          </Text>
        </CardContent>
      </CardWrapper>
    </Grid>
  );
}

image