Skip to content

Commit

Permalink
feat: added close button to userinfo and about dialogs
Browse files Browse the repository at this point in the history
  • Loading branch information
roar-larsen committed Dec 21, 2023
1 parent 3de9c5a commit 47f38c6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
11 changes: 10 additions & 1 deletion packages/dm-core-plugins/src/header/components/AboutDialog.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Dialog, TApplication } from '@development-framework/dm-core'
import { Button } from '@equinor/eds-core-react'
import { Button, Icon } from '@equinor/eds-core-react'
import React from 'react'
import { close } from '@equinor/eds-icons'

type AboutDialogProps = {
isOpen: boolean
Expand All @@ -20,6 +21,14 @@ export const AboutDialog = (props: AboutDialogProps) => {
>
<Dialog.Header>
<Dialog.Title>About {applicationEntity.label}</Dialog.Title>
<Button
variant='ghost'
onClick={() => {
setIsOpen(false)
}}
>
<Icon data={close} size={16} title='Close' />
</Button>
</Dialog.Header>
<Dialog.CustomContent>
{applicationEntity.description}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ import {
TRole,
useDMSS,
} from '@development-framework/dm-core'
import { Button, Radio, Typography } from '@equinor/eds-core-react'
import { Button, Icon, Radio, Typography } from '@equinor/eds-core-react'
import { AxiosResponse } from 'axios'
import React, { useContext, useState } from 'react'
import { AuthContext } from 'react-oauth2-code-pkce'
import { toast } from 'react-toastify'
import styled from 'styled-components'
import { close } from '@equinor/eds-icons'

const UnstyledList = styled.ul`
margin: 0;
Expand Down Expand Up @@ -63,6 +64,14 @@ export const UserInfoDialog = (props: UserInfoDialogProps) => {
>
<Dialog.Header>
<Dialog.Title>User info</Dialog.Title>
<Button
variant='ghost'
onClick={() => {
setIsOpen(false)
}}
>
<Icon data={close} size={16} title='Close' />
</Button>
</Dialog.Header>
<Dialog.CustomContent>
<Row>
Expand Down

0 comments on commit 47f38c6

Please sign in to comment.