forked from ScottLogic/InferLLM
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
115 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
.button_container { | ||
background-color: var(--primary); | ||
border-radius: 20px; | ||
} | ||
|
||
.button { | ||
height: 40px; | ||
box-sizing: border-box; | ||
color: var(--grey-900); | ||
font-weight: 700; | ||
font-size: 16px; | ||
line-height: 20px; | ||
border-radius: 20px; | ||
border: none; | ||
padding: 0 24px; | ||
background-color: transparent; | ||
display: inline-flex; | ||
align-items: center; | ||
} | ||
|
||
.button:hover { | ||
background-color: rgb(255 255 255 / 0.15); | ||
box-shadow: 0 1px 4px 0 rgb(0 0 0 / 0.2); | ||
cursor: pointer; | ||
} | ||
|
||
.button:active:enabled { | ||
background-color: var(--primary-dark); | ||
} | ||
|
||
.button_container:has(.button:disabled) { | ||
background-color: var(--grey-400); | ||
opacity: 0.5; | ||
} | ||
|
||
.icon { | ||
margin-right: 8px; | ||
} | ||
|
||
.button:has(.icon) { | ||
padding-left: 16px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import React from 'react'; | ||
import styles from './button.module.css'; | ||
|
||
interface ButtonProps { | ||
text: string; | ||
icon?: string; | ||
disabled?: boolean; | ||
onClick: () => void; | ||
} | ||
|
||
export const Button = ({ text, icon, disabled, onClick }: ButtonProps) => { | ||
return ( | ||
<div className={styles.button_container}> | ||
<button disabled={disabled} className={styles.button} onClick={onClick}> | ||
{icon && <img src={icon} className={styles.icon} />} | ||
{text} | ||
</button> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.container { | ||
width: 100%; | ||
height: 80px; | ||
padding: 0 36px; | ||
background-color: var(--grey-900); | ||
box-sizing: border-box; | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import React from 'react'; | ||
import styles from './navbar.module.css'; | ||
import ChatIcon from '../icons/chat.svg'; | ||
import { Button } from './button'; | ||
import logo from '../icons/primary-logo-dark.svg'; | ||
|
||
export const NavBar = () => { | ||
return ( | ||
<div className={styles.container}> | ||
<div> | ||
<img src={logo} title="Infer ESG" /> | ||
</div> | ||
<div> | ||
<Button | ||
icon={ChatIcon} | ||
text="Start new chat" | ||
onClick={() => { | ||
console.log('Start new chat'); | ||
}} | ||
/> | ||
</div> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters