-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
297 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
<template> | ||
<el-dialog | ||
:modelValue="visible" | ||
:show-close="true" | ||
class="sparc-design-system-large-modal-dialog" | ||
@close="closeDialog" | ||
> | ||
<div class="dialog-container"> | ||
<div class="optional-content-container"> | ||
<slot name="optionalContent" /> | ||
</div> | ||
<div class="main-content-container"> | ||
<slot name="mainContent" /> | ||
</div> | ||
</div> | ||
<el-button class="primary">Test</el-button> | ||
</el-dialog> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: 'LargeModal', | ||
props: { | ||
visible: { | ||
type: Boolean, | ||
default: false | ||
} | ||
}, | ||
setup(props, { emit }) { | ||
function closeDialog() { | ||
emit('close-download-dialog'); | ||
} | ||
return { | ||
closeDialog, | ||
}; | ||
} | ||
}; | ||
</script> | ||
|
||
<style lang="scss"> | ||
@import '../assets/_variables.scss'; | ||
.sparc-design-system-large-modal-dialog { | ||
border-radius: 0; | ||
width: fit-content; | ||
max-width: 868px; | ||
button:hover { | ||
box-shadow: none; | ||
} | ||
.optional-content-container { | ||
.download-button { | ||
padding-top: 10px; | ||
padding-bottom: 10px; | ||
background: white !important; | ||
text-align: center; | ||
color: $purple !important; | ||
min-width: 80px; | ||
} | ||
button:hover { | ||
background: white; | ||
color: $purple; | ||
} | ||
} | ||
.el-dialog__body { | ||
padding: 0; | ||
color: black; | ||
} | ||
.el-dialog__header { | ||
padding: 0 !important; | ||
} | ||
} | ||
</style> | ||
|
||
<style lang="scss" scoped> | ||
@import '../assets/_variables.scss'; | ||
.sparc-design-system-large-modal-dialog { | ||
.dialog-container { | ||
display: flex; | ||
word-break: normal; | ||
} | ||
.main-content-container { | ||
border: 1px solid $lineColor1; | ||
border-left: none; | ||
width: 100%; | ||
padding: 2rem; | ||
} | ||
.optional-content-container { | ||
background-color: $purple; | ||
box-sizing: border-box; | ||
flex-shrink: 0; | ||
color: #fff; | ||
max-width: 316px; | ||
min-width: min-content; | ||
width: 35%; | ||
overflow: hidden; | ||
position: relative; | ||
padding: 2rem; | ||
} | ||
.optional-content-container:empty { | ||
display: none; | ||
} | ||
.close-dialog { | ||
background: none; | ||
border: none; | ||
cursor: pointer; | ||
padding: .25rem .25rem 0 0; | ||
position: absolute; | ||
right: 0; | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
<template> | ||
<el-radio | ||
:label="label" | ||
:disabled="disabled" | ||
:modelValue="current" | ||
> | ||
{{ display }} | ||
</el-radio> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: 'SparcRadio', | ||
props: { | ||
value: { | ||
type: [String, Number, Boolean], | ||
required: true | ||
}, | ||
label: { | ||
type: [String, Number, Boolean], | ||
required: true | ||
}, | ||
disabled: { | ||
type: Boolean, | ||
default: false | ||
}, | ||
display: { | ||
type: [String, Number], | ||
required: true | ||
} | ||
}, | ||
computed: { | ||
current: { | ||
get: function() { | ||
return this.value | ||
}, | ||
set: function(val) { | ||
this.$emit('input', val) | ||
} | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
@import '../assets/_variables.scss'; | ||
:deep(.el-radio__label) { | ||
color: $grey; | ||
} | ||
:deep(.el-radio__input) { | ||
&.is-disabled { | ||
&.is-checked { | ||
.el-radio__inner { | ||
background-color: #909399; | ||
&::after { | ||
background-color: white; | ||
opacity: 80%; | ||
} | ||
} | ||
} | ||
} | ||
&:not(.is-checked) { | ||
.el-radio__inner { | ||
border-color: $lightGrey; | ||
} | ||
} | ||
} | ||
.el-radio { | ||
margin-left: 0; | ||
padding-top: 5px; | ||
&:first-child { | ||
padding-top: 0; | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,15 @@ | ||
import '../assets/styles.scss'; | ||
|
||
import SparcLogo from './SparcLogo.vue'; | ||
import LargeModal from './LargeModal.vue' | ||
import SparcTooltip from './SparcTooltip.vue' | ||
import SparcRadio from './SparcRadio.vue'; | ||
|
||
export default { | ||
install(app) { | ||
app.component('SparcLogo', SparcLogo); | ||
app.component('LargeModal', LargeModal); | ||
app.component('SparcTooltip', SparcTooltip); | ||
app.component('SparcRadio', SparcRadio); | ||
}, | ||
}; |