Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
boco-frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
idatt2106_2022_02
boco-frontend
Commits
9393e8df
Commit
9393e8df
authored
2 years ago
by
Erik Borgeteien Hansen
Browse files
Options
Downloads
Patches
Plain Diff
add color w default blue to coloredbutton
parent
a0123045
No related branches found
No related tags found
1 merge request
!136
Warning when leaving group
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/components/BaseComponents/ColoredButton.vue
+17
-1
17 additions, 1 deletion
src/components/BaseComponents/ColoredButton.vue
with
17 additions
and
1 deletion
src/components/BaseComponents/ColoredButton.vue
+
17
−
1
View file @
9393e8df
<
template
>
<button
class=
"block text-white bg-primary-medium hover:bg-primary-dark focus:ring-4 focus:outline-none focus:ring-primary-light font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-primary-medium dark:hover:bg-primary-dark dark:focus:ring-primary-light"
class=
"flex items-center px-2 py-2 font-medium tracking-wide capitalize text-white transition-colors duration-200 transform rounded-md focus:outline-none focus:ring focus:ring-opacity-80"
:class=
"color"
>
{{
text
}}
</button>
...
...
@@ -11,6 +12,21 @@ export default {
name
:
"
ColoredButton
"
,
props
:
{
text
:
String
,
buttonColor
:
{
type
:
String
,
default
:
"
blue
"
,
},
},
computed
:
{
color
()
{
if
(
this
.
buttonColor
===
"
red
"
)
{
return
"
bg-error-medium hover:bg-error-dark focus:ring-error-light
"
;
}
if
(
this
.
buttonColor
===
"
green
"
)
{
return
"
bg-success-medium hover:bg-success-dark focus:ring-success-light
"
;
}
return
"
bg-primary-medium hover:bg-primary-dark focus:ring-primary-light
"
;
},
},
};
</
script
>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment