GH-4278 - Updating card modal attach btn (#4361)

* GH-4278 - Updating card modal attach btn

* Updating flex

* Updating test

* Updating test
This commit is contained in:
Asaad Mahmood 2022-12-20 18:36:02 +05:00 committed by GitHub
parent a43228c4d2
commit 401062d128
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 65 additions and 26 deletions

View file

@ -31,7 +31,9 @@ exports[`components/boardSelector escape button should unmount the component 1`]
<div
class="toolbar--right"
>
<div>
<div
class="d-flex"
>
<button
class="Button emphasis--secondary"
type="button"
@ -134,7 +136,9 @@ exports[`components/boardSelector renders with no results 1`] = `
<div
class="toolbar--right"
>
<div>
<div
class="d-flex"
>
<button
class="Button emphasis--secondary"
type="button"
@ -238,7 +242,9 @@ exports[`components/boardSelector renders with some results 1`] = `
<div
class="toolbar--right"
>
<div>
<div
class="d-flex"
>
<button
class="Button emphasis--secondary"
type="button"
@ -440,7 +446,9 @@ exports[`components/boardSelector renders without start searching 1`] = `
<div
class="toolbar--right"
>
<div>
<div
class="d-flex"
>
<button
class="Button emphasis--secondary"
type="button"

View file

@ -28,7 +28,9 @@ exports[`components/cardDialog already following card 1`] = `
<div
class="toolbar--right"
>
<div>
<div
class="d-flex"
>
<button
type="button"
>
@ -470,7 +472,9 @@ exports[`components/cardDialog return a cardDialog readonly 1`] = `
<div
class="toolbar--right"
>
<div>
<div
class="d-flex"
>
<button
type="button"
>
@ -599,7 +603,9 @@ exports[`components/cardDialog return cardDialog menu content 1`] = `
<div
class="toolbar--right"
>
<div>
<div
class="d-flex"
>
<button
type="button"
>
@ -946,7 +952,9 @@ exports[`components/cardDialog return cardDialog menu content and cancel delete
<div
class="toolbar--right"
>
<div>
<div
class="d-flex"
>
<button
type="button"
>
@ -1156,7 +1164,9 @@ exports[`components/cardDialog should match snapshot 1`] = `
<div
class="toolbar--right"
>
<div>
<div
class="d-flex"
>
<button
type="button"
>
@ -1366,7 +1376,9 @@ exports[`components/cardDialog should match snapshot without permissions 1`] = `
<div
class="toolbar--right"
>
<div>
<div
class="d-flex"
>
<button
type="button"
>

View file

@ -12,19 +12,7 @@
.cardFollowBtn {
display: inline-flex;
&.attach {
margin-right: 20px;
color: rgba(var(--center-channel-color-rgb), 0.64);
background-color: rgba(var(--center-channel-color-rgb), 0.08);
}
&.follow {
color: rgba(var(--center-channel-color-rgb), 0.64);
background-color: rgba(var(--center-channel-color-rgb), 0.08);
}
&.unfollow {
color: rgb(var(--button-bg-rgb));
background-color: rgba(var(--button-bg-rgb), 0.08);
&--attach {
margin-right: 8px;
}
}

View file

@ -223,7 +223,8 @@ const CardDialog = (props: Props): JSX.Element => {
<BoardPermissionGate permissions={[Permission.ManageBoardCards]}>
<Button
icon={<CompassIcon icon='paperclip'/>}
className='cardFollowBtn attach'
className='cardFollowBtn cardFollowBtn--attach'
emphasis='gray'
size='medium'
onClick={addElement}
>
@ -238,6 +239,7 @@ const CardDialog = (props: Props): JSX.Element => {
<>
<Button
className='cardFollowBtn follow'
emphasis='gray'
size='medium'
onClick={() => mutator.followBlock(props.cardId, 'card', me!.id)}
>
@ -250,6 +252,7 @@ const CardDialog = (props: Props): JSX.Element => {
<>
<Button
className='cardFollowBtn unfollow'
emphasis='tertiary'
size='medium'
onClick={() => mutator.unfollowBlock(props.cardId, 'card', me!.id)}
>

View file

@ -63,7 +63,7 @@ const Dialog = (props: Props) => {
{subtitle && <h5 className='dialog-subtitle'>{subtitle}</h5>}
</div>
<div className='toolbar--right'>
{toolbar && <div>{toolbar}</div>}
{toolbar && <div className='d-flex'>{toolbar}</div>}
{toolsMenu && <MenuWrapper>
<IconButton
size='medium'

View file

@ -89,6 +89,34 @@
}
}
&.emphasis--quaternary {
background: transparent;
color: rgb(var(--button-bg-rgb));
&:hover {
background: rgba(var(--button-bg-rgb), 0.08);
}
&:active {
background-color: rgb(var(--button-bg-rgb), 0.12);
}
}
&.emphasis--gray {
background: transparent;
color: rgba(var(--center-channel-color-rgb), 0.64);
&:hover {
color: rgba(var(--center-channel-color-rgb), 0.72);
background: rgba(var(--center-channel-color-rgb), 0.08);
}
&:active {
color: rgb(var(--button-bg-rgb));
background-color: rgb(var(--button-bg-rgb), 0.12);
}
}
&.emphasis--danger {
color: rgb(var(--button-danger-color-rgb));
background-color: rgb(var(--button-danger-bg-rgb));