Skip to content

Commit

Permalink
fix: header ui styling after tailwind
Browse files Browse the repository at this point in the history
  • Loading branch information
pbullhove committed Nov 29, 2023
1 parent 264e4f9 commit 0d112fe
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 1 addition & 3 deletions e2e/tests/plugin-header.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ test.beforeEach(async ({ page }) => {

test('Load header', async ({ page }) => {
await expect(page.getByLabel('AppSelector').nth(1)).toBeVisible()
await expect(
page.getByRole('heading', { name: 'Data Modelling Example App' })
).toBeVisible()
await expect(page.getByLabel('main-heading').nth(1)).toBeVisible()
await expect(page.getByRole('button', { name: 'User' }).nth(1)).toBeVisible()
await expect(page.getByRole('button', { name: 'About' }).nth(1)).toBeVisible()
})
Expand Down
7 changes: 4 additions & 3 deletions packages/dm-core-plugins/src/header/HeaderPlugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@ const Icons = styled.div`
margin-left: 40px;
}
`
const Logo = styled.h2`
const Logo = styled.span`
paddinginline: 10;
color: #007079;
font-weight: 500;
margin-right: 3rem;
margin-left: 0.5rem;
font-size: 18px;
`

const ClickableIcon = styled.button`
Expand Down Expand Up @@ -129,11 +130,11 @@ export default (props: IUIPlugin): React.ReactElement => {
>
<TopBar.Header
style={{
position: 'relative',
display: 'flex',
alignContent: 'center',
}}
>
<Logo>{entity.label}</Logo>
<Logo aria-label="main-heading">{entity.label}</Logo>
<AppSelector
items={recipeNames}
onSelectItem={(item) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const AppSelectorButton = styled.button`
marginleft: 60px;
border: 0;
appearance: none;
align-content: center;
background-color: transparent;
&:hover {
color: gray;
Expand All @@ -55,9 +56,9 @@ export const AppSelector = ({
onClick={() => setAppSelectorOpen(!appSelectorOpen)}
aria-label="AppSelector"
>
<h4>{currentItem}</h4>
<span className="text-xs font-bold self-center">{currentItem}</span>
<Icon
style={{ marginTop: '13px' }}
className="mt-0.5"
data={appSelectorOpen ? chevron_up : chevron_down}
></Icon>
</AppSelectorButton>
Expand Down

0 comments on commit 0d112fe

Please sign in to comment.