#sarita_21302

1 messages · Page 1 of 1 (latest)

lapis swiftBOT
thin atlas
#

Hello

#

You would use price_data here to create the Price inline

lapis swiftBOT
round tide
#

Is it possible to display only payment screen and not the product screen on the left?

thin atlas
#

No that's not possible

round tide
#

ok. I want to display above 'card information' style card fields on the form created using payment-elements. How can I acheive it? Can I hide the labels, if not, is there any other ways to customize it?

thin atlas
lapis swiftBOT
round tide
#

I changed the labels to b floating but it doesn't seem to be working

const paymentElementOptions = {
layout: "tabs",
labels: "floating",
};

const paymentElement = elements.create("payment", paymentElementOptions);
paymentElement.mount("#payment-element");

thin atlas
#

What does "it doesn't seem to be working" mean?

round tide
#

The labels are not floating, it's always there. is there a sample page that I can refer to see how it looks

thin atlas
#

You need to pass an appearance object to paymentElementOptions

round tide
#

ok

#

const appearance = {
rules: {
'.Tab': {
border: '1px solid #E0E6EB',
boxShadow: '0px 1px 1px rgba(0, 0, 0, 0.03), 0px 3px 6px rgba(18, 42, 66, 0.02)',
},

  '.Tab:hover': {
    color: 'var(--colorText)',
  },

  '.Tab--selected': {
    borderColor: '#E0E6EB',
    boxShadow: '0px 1px 1px rgba(0, 0, 0, 0.03), 0px 3px 6px rgba(18, 42, 66, 0.02), 0 0 0 2px var(--colorPrimary)',
  },

  '.Input--invalid': {
    boxShadow: '0 1px 1px 0 rgba(0, 0, 0, 0.07), 0 0 0 2px var(--colorDanger)',
  },

  // See all supported class names and selector syntax below
}

};

// Pass the appearance object to the Elements instance
const elements = stripe.elements({clientSecret, appearance});