Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
boco-frontend
Manage
Activity
Members
Labels
Plan
Issues
21
Issue boards
Milestones
Wiki
Code
Merge requests
0
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
Merge requests
!87
An error occurred while fetching the assigned milestone of the selected merge_request.
Community request
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Community request
community-request
into
main
Overview
0
Commits
47
Pipelines
3
Changes
40
Merged
Haakon Tideman Kanter
requested to merge
community-request
into
main
2 years ago
Overview
0
Commits
47
Pipelines
3
Changes
40
Expand
added request for joining private community
1
0
1
1
1
1
Merge request reports
Compare
main
version 2
858b0438
2 years ago
version 1
333d21e1
2 years ago
main (base)
and
latest version
latest version
1c96f57a
47 commits,
2 years ago
version 2
858b0438
46 commits,
2 years ago
version 1
333d21e1
33 commits,
2 years ago
40 files
+
1121
−
281
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
40
Search (e.g. *.vue) (Ctrl+P)
src/components/BaseComponents/IconButton.vue
+
17
−
10
Options
<
template
>
<!-- Icon button -->
<button
class=
"block w-fit text-white text-base bg-primary-medium hover:bg-primary-dark focus:ring-4 focus:outline-none focus:ring-primary-light font-medium rounded-lg text-center dark:bg-primary-medium dark:hover:bg-primary-dark dark:focus:ring-primary-dark"
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"
>
<div
class=
"flex flex-row px-5 py-2.5 h-10"
>
<!-- Icon slot: Default content "Ban"-icon -->
<div
class=
"h-6 w-6"
>
<slot>
<BanIcon
/>
</slot>
</div>
<p>
{{
text
}}
</p>
<div
class=
"w-5 h-5 mx-1"
>
<slot><BanIcon
/></slot>
</div>
<span
class=
"mx-1"
>
{{
text
}}
</span>
</button>
</
template
>
@@ -22,9 +17,21 @@ export default {
name
:
"
IconButton
"
,
props
:
{
text
:
String
,
buttonColor
:
String
,
},
components
:
{
BanIcon
,
},
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
>
Loading