UNPKG

@allakando/allakando-web-ui

Version:

Allakando's web component library

36 lines (35 loc) 3.22 kB
const r=`# Allakando Session-Item\r \r The Allakando session-item component is to display the details related to a session of an user. The details consists of What type of session it is Recurring or One-time, start date and end date formatted in DD MMM YYYY or the week days, start time in HH:MM format of the session and the session duration in hours.\r \r There are three to four mandatory attributes and altogether six attributes that needed to be passed on to the component\r \r There are two states of the application majorly,\r \r ## Recurring\r \r In Recurring state there will be weekdays mentioned to show which weekday(s) the session will be occuring, the time at which the session is scheduled on those weekday(s), and the duration in hours for each sessions.\r \r ## One-Time\r \r In One-Time state there will be a start date and optionally an end date showing up to state when the session is starting and ending. The time at which the session is scheduled and the duration of the session in hours.\r \r ## Attributes\r \r 1. type: Type of schedule\r 2. startdate: Start date of the schedule\r 3. enddate: End date of the schedule\r 4. time: Time the session is scheduled in HH:MM\r 5. hours: Duration of the session in integer or float\r 6. country: To regulate the month text and the general text\r `,i={title:"Atomic Components/Session-Item",component:"ako-session-item",tags:["autodocs"],parameters:{docs:{description:{component:r}}},argTypes:{type:{options:["Recurring","One-Time"],control:{type:"select"}},startdate:{control:{type:"date"}},enddate:{control:{type:"date"}},time:{control:{type:"text"}},hours:{control:{type:"text"}},frequency:{options:["Weekly","Every Second Week","Monthly"],control:{type:"select"}},country:{options:["Sweden","France"],control:{type:"select"}}}},t=e=>`<ako-session-item ${e.type?`type="${e.type}"`:""} ${e.startdate?`startdate="${new Date(e.startdate).toISOString()}"`:""} ${e.enddate?`enddate="${new Date(e.enddate).toISOString()}"`:""} ${e.time?`time="${e.time}"`:""} ${e.hours?`hours="${e.hours}"`:""} ${e.country?`country="${e.country}"`:""} ${e.frequency?`frequency="${e.frequency}"`:""} > Måndagar </ako-session-item>`;t.args={type:"One-Time",startdate:Date.now(),enddate:Date.now()+60*60*24*7*1e3,time:"10:00",hours:"2",frequency:"Weekly"};var n,s,o;t.parameters={...t.parameters,docs:{...(n=t.parameters)==null?void 0:n.docs,source:{originalSource:'args => {\n const string = `<ako-session-item \n ${args.type ? `type="${args.type}"` : ""}\n ${args.startdate ? `startdate="${new Date(args.startdate).toISOString()}"` : ""}\n ${args.enddate ? `enddate="${new Date(args.enddate).toISOString()}"` : ""}\n ${args.time ? `time="${args.time}"` : ""}\n ${args.hours ? `hours="${args.hours}"` : ""}\n ${args.country ? `country="${args.country}"` : ""}\n ${args.frequency ? `frequency="${args.frequency}"` : ""}\n >\n Måndagar\n </ako-session-item>`;\n return string;\n}',...(o=(s=t.parameters)==null?void 0:s.docs)==null?void 0:o.source}}};const d=["Template"];export{t as Template,d as __namedExportsOrder,i as default};