Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: makes modal drawer wider #103

Merged
merged 3 commits into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"printWidth": 100,
"singleQuote": true,
"semi": true,
"tabWidth": 2
}
11 changes: 4 additions & 7 deletions packages/Modals/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,16 @@ import { App, Plugin } from 'vue';
import SimpleModal from './src/SimpleModal.vue';
import ModalDrawer from './src/ModalDrawer.vue';
import DefaultModal from './src/DefaultModal.vue';
import { fadeDuration } from './src/index'
import { fadeDuration } from './src/index';
import IconBackWithColor from './src/IconBackWithColor.vue';

export const ModalsPlugin: Plugin = {
install(app: App) {
app.component('astar-simple-modal', SimpleModal);
app.component('astar-modal-drawer', ModalDrawer);
app.component('astar-default-modal', DefaultModal);
app.component('astar-icon-back-with-color', IconBackWithColor);
},
};

export {
SimpleModal,
ModalDrawer,
DefaultModal,
fadeDuration
};
export { SimpleModal, ModalDrawer, DefaultModal, fadeDuration, IconBackWithColor };
17 changes: 10 additions & 7 deletions packages/Modals/src/ModalDrawer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,19 @@ export default defineComponent({
z-index: 10;
top: 104px;
right: 0px;
width: 544px;
width: 100%;
height: calc(100% - 104px);
text-align: center;
background: rgba(255, 255, 255, 0.5);
box-shadow: -1px 0px 3px rgba(0, 0, 0, 0.1);
@media (min-width: $xs) {
width: 375px;
}
@media (min-width: $sm) {
width: 544px;
}
@media (min-width: $lg) {
width: 928px;
top: 96px;
height: calc(100% - 96px);
}
Expand All @@ -120,19 +127,15 @@ export default defineComponent({
.modal-content {
background-color: $gray-1;
border: 0px solid transparent;
padding: 24px 30px;
padding: 32px 8px;
width: 100% !important;
height: 100%;
overflow-y: auto;
box-shadow: -2px 10px 10px 0px #9999;
background: white;

@media (min-width: $xs) {
width: 375px;
}
@media (min-width: $sm) {
width: 544px;
padding: 46px 40px !important;
padding: 24px 30px;
}
}

Expand Down
30 changes: 7 additions & 23 deletions packages/export_type.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
import {
Button,
IrregularButton,
RadioBtn,
SmallButton,
TextButton,
} from './Buttons';
import {
ConnectionIndicator,
Header
} from './Header';
import { Button, IrregularButton, RadioBtn, SmallButton, TextButton } from './Buttons';
import { ConnectionIndicator, Header } from './Header';
import {
Icon3dots,
IconAccountSample,
Expand Down Expand Up @@ -63,17 +54,9 @@ import {
IconWallet,
IconYoutube,
} from './Icons';
import {
DefaultModal,
ModalDrawer,
SimpleModal
} from './Modals';
import {
Spinner
} from './Spinner';
import {
Text
} from './Text';
import { DefaultModal, ModalDrawer, SimpleModal, IconBackWithColor } from './Modals';
import { Spinner } from './Spinner';
import { Text } from './Text';

export interface GlobalComponents {
'astar-button': typeof Button;
Expand Down Expand Up @@ -139,5 +122,6 @@ export interface GlobalComponents {
'astar-modal-drawer': typeof ModalDrawer;
'astar-simple-modal': typeof SimpleModal;
'astar-spinner': typeof Spinner;
'astar-text': typeof Text;
'astar-text': typeof Text;
'astar-icon-back-with-color': typeof IconBackWithColor;
}
14 changes: 7 additions & 7 deletions packages/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ const AstarUIPlugin: Plugin = {

export default AstarUIPlugin;

export * from './Text'
export * from './Spinner'
export * from './Modals'
export * from './Header'
export * from './Buttons'
export * from './Icons'
export * from './Text';
export * from './Spinner';
export * from './Modals';
export * from './Header';
export * from './Buttons';
export * from './Icons';

export * from './export_type'
export * from './export_type';
11 changes: 11 additions & 0 deletions src/stories/Icons/IconBackWithColor.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import IconBackWithColor from "packages/Modals/src/IconBackWithColor.vue";

export default {
title: 'Icons/IconBackWithColor',
component: IconBackWithColor
};

export const DefaultIcon = () => ({
components: { IconBackWithColor },
template: '<IconBackWithColor />',
});