Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Ask the user for their key type
echo Which type of key you want to generate? Please select from [rsa, ed25519]
read keyType
echo Please enter your email
read email
methods: {
loadSecondDropdownOptions() {
this.secondDropdownValue = "";
this.secondDropdownOptions = this.response.fruits.find(fruit => fruit.name === this.firstDropdownValue)?.weights;
}
}
<template>
<div>{{this.modelValue}}</div>
</template>
<script>
export default {
props: {
modelValue: Array
}
}
<template>
<Child v-model="this.fruits" />
</template>
<script>
export default {
data() {
return {
fruits: []
}
<template>
<Child v-model="this.fruits" />
</template>
<script>
export default {
data() {
return {
fruits1: []
}
<template>
<!-- Dropdown 1-->
<div class="dropdown-container">
<div class="dropdown-title-container">
<label data-test="dropdown-title">Fruits</label>
</div>
<DropdownContainer :model-value="this.firstDropdownValue"
:options="this.firstDropdownOptions"
placeholder="Please select a fruit" @update:model-value="(event) =>
updateFirstDropdownValueAndLoadSecondDropdownOptions(event)">
<template>
<Child1 v-model:firstDropdownValue="firstDropdownValue"
v-model:secondDropdownValue="secondDropdownValue"/>
<Child2 />
<Child3 />
</template>
<script>
export default {
data() {
@sankita15
sankita15 / build.gradle
Last active December 28, 2019 09:35
Gradle task
node {
version = '12.12.0'
yarnVersion = '1.15.2'
download = false
yarnWorkDir = file("${project.buildDir}/yarn")
nodeModulesDir = file("${project.projectDir}/../frontend")
@sankita15
sankita15 / GuestInvitation.js
Last active December 27, 2019 11:07
Guest Invitation Page
import React from "react";
export default class GuestInvitation extends React.Component {
constructor(props){
super(props);
this.state = {
name: '',
message: ''
@sankita15
sankita15 / App.js
Created December 27, 2019 11:03
Redirect to invitation page
import React from "react";
import GuestInvitation from './component/GuestInvitation'
import { BrowserRouter as Router, Route, Switch } from "react-router-dom";
const App = () => (
<Router>
<Switch>
<Route exact path="/invite">
<GuestInvitation />
</Route>