Skip to content
This repository was archived by the owner on Aug 5, 2025. It is now read-only.
Closed
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
4 changes: 4 additions & 0 deletions packages/react-chat/src/assets/svg/arrow-right.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions packages/react-chat/src/assets/svg/coffee.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions packages/react-chat/src/assets/svg/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
export { default as close } from './close.svg?react';
export { default as closeV2 } from './closeV2.svg?react';
export { default as coffee } from './coffee.svg?react';
export { default as arrowRight } from './arrow-right.svg?react';
export { default as largeArrowLeft } from './large-arrow-left.svg?react';
export { default as microphone } from './microphone.svg?react';
export { default as minus } from './minus.svg?react';
Expand Down
84 changes: 84 additions & 0 deletions packages/react-chat/src/components/BeanScan/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
import Icon from '../Icon';
import { styled } from '../../styles';
import React from 'react';

const Container = styled('div', {
minHeight: '100vh',
background: 'white',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
padding: '1rem',
});

const LogoContainer = styled('div', {
position: 'relative',
marginBottom: '2rem',
});

const MainIcon = styled(Icon, {
width: '6rem',
height: '6rem',
color: '$stone800',
});

const SmallIcon = styled(Icon, {
width: '3rem',
height: '3rem',
color: '$stone600',
position: 'absolute',
'&.top': {
top: '-1rem',
right: '-1rem',
transform: 'rotate(45deg)',
},
'&.bottom': {
bottom: '-1rem',
left: '-1rem',
transform: 'rotate(-45deg)',
},
});

const Title = styled('h1', {
fontSize: '1.875rem',
fontWeight: 'bold',
marginBottom: '0.5rem',
color: '$gray900',
});

const Subtitle = styled('p', {
fontSize: '1rem',
color: '$gray600',
marginBottom: '4rem',
});

const Button = styled('button', {
backgroundColor: '$gray900',
color: 'white',
padding: '0.75rem',
borderRadius: '9999px',
'&:hover': {
backgroundColor: '$gray800',
transition: 'background-color 0.2s',
},
});

export const BeanScan: React.FC = () => {
return (
<Container>
<LogoContainer>
<MainIcon svg="coffee" />
<SmallIcon svg="coffee" className="top" />
<SmallIcon svg="coffee" className="bottom" />
</LogoContainer>
<Title>BeanScan</Title>
<Subtitle>Scan & Explore Origins</Subtitle>
<Button>
<Icon svg="arrowRight" />
</Button>
Comment on lines +77 to +79
Copy link

Choose a reason for hiding this comment

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

The Button component needs an aria-label attribute since it only contains an icon with no text content. Adding aria-label="Start Scan" (or similar descriptive text) would ensure screen reader users can understand the button's purpose. This is an important accessibility requirement for icon-only buttons.

Spotted by Graphite Reviewer

Is this helpful? React 👍 or 👎 to let us know.

</Container>
);
};

export default BeanScan;